code stringlengths 57 237k |
|---|
package alternativa.tanks.models.user {
import platform.client.fp10.core.type.IGameObject;
[ModelInterface]
public interface IClanUserModel {
function loadingInServiceSpace() : Boolean;
function addInClan(param1:IGameObject) : void;
function rejectAll() : void;
function revoke(param1:IGameObject) : void;
function reject(param1:IGameObject) : void;
function acceptRequest(param1:IGameObject) : void;
}
}
|
package platform.client.fp10.core.model {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ObjectLoadListenerEvents implements ObjectLoadListener {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function ObjectLoadListenerEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function objectLoaded() : void {
var i:int = 0;
var m:ObjectLoadListener = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ObjectLoadListener(this.impl[i]);
m.objectLoaded();
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package com.alternativaplatform.projects.tanks.client.models.battlefield
{
public class BattlefieldResources
{
public function BattlefieldResources()
{
super();
}
}
}
|
package alternativa.tanks.gui.shop.shopitems.item.kits.paypal {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.shop.shopitems.item.kits.paypal.PayPallKitShopItemSkin_normalStateClass.png")]
public class PayPallKitShopItemSkin_normalStateClass extends BitmapAsset {
public function PayPallKitShopItemSkin_normalStateClass() {
super();
}
}
}
|
package mx.core {
import flash.text.Font;
use namespace mx_internal;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "4.6.0.23201";
public function FontAsset() {
super();
}
}
}
|
package alternativa.tanks.models.battlefield.inventory
{
import alternativa.object.ClientObject;
import controls.InventoryIcon;
import flash.utils.getTimer;
public class InventoryItem
{
private var id:int;
private var _count:int;
private var clientObject:ClientObject;
private var icon:InventoryIcon;
private var cooldownStartTime:int = -1;
private var cooldownTime:int;
public function InventoryItem(clientObject:ClientObject, id:int, quantity:int, coolDownMsec:int)
{
super();
this.clientObject = clientObject;
this.id = id;
this.icon = new InventoryIcon(id);
this._count = quantity;
this.cooldownTime = coolDownMsec;
}
public function getClientObject() : ClientObject
{
return this.clientObject;
}
public function getId() : int
{
return this.id;
}
public function getIcon() : InventoryIcon
{
return this.icon;
}
public function getCooldownStatus(now:int) : Number
{
if(this.cooldownStartTime == -1)
{
return 1;
}
var status:Number = (now - this.cooldownStartTime) / this.cooldownTime;
if(status > 1)
{
status = 1;
this.clearCooldown();
}
return status;
}
public function clearCooldown() : void
{
this.cooldownStartTime = -1;
}
public function startCooldown(cooldownTime:int) : void
{
this.cooldownStartTime = getTimer();
}
public function set count(value:int) : void
{
this._count = value;
}
public function get count() : int
{
return this._count;
}
public function canActivate() : Boolean
{
return this.cooldownStartTime < 0 && this._count > 0;
}
}
}
|
package projects.tanks.client.battlefield.models.effects.duration.time {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class DurationModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:DurationModelServer;
private var client:IDurationModelBase = IDurationModelBase(this);
private var modelId:Long = Long.getLong(2016151916,-1755051516);
public function DurationModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new DurationModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(DurationCC,false)));
}
protected function getInitParam() : DurationCC {
return DurationCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.controller.commands.goto_ {
import alternativa.tanks.controller.events.showform.ShowFormEvent;
import org.robotlegs.mvcs.Command;
public class GoToInviteCommand extends Command {
public function GoToInviteCommand() {
super();
}
override public function execute() : void {
dispatch(new ShowFormEvent(ShowFormEvent.SHOW_INVITE_FORM));
}
}
}
|
package projects.tanks.client.battlefield.models.battle.pointbased {
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 platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.battle.pointbased.flag.ClientFlagFlyingData;
import projects.tanks.client.battlefield.types.Vector3d;
public class PointBasedBattleModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:PointBasedBattleModelServer;
private var client:IPointBasedBattleModelBase = IPointBasedBattleModelBase(this);
private var modelId:Long = Long.getLong(705910854,-1245375245);
private var _dropFlagId:Long = Long.getLong(906489116,-114905795);
private var _dropFlag_flagIdCodec:ICodec;
private var _dropFlag_positionCodec:ICodec;
private var _dropFlyingFlagId:Long = Long.getLong(1984730396,1294099278);
private var _dropFlyingFlag_idCodec:ICodec;
private var _dropFlyingFlag_pointIdCodec:ICodec;
private var _dropFlyingFlag_fallingDataCodec:ICodec;
private var _exileFlagId:Long = Long.getLong(1963608681,-1790478509);
private var _exileFlag_idCodec:ICodec;
private var _flagDeliveredId:Long = Long.getLong(12556924,688130128);
private var _flagDelivered_flagIdCodec:ICodec;
private var _flagDelivered_baseIdCodec:ICodec;
private var _flagDelivered_delivererTankIdCodec:ICodec;
private var _flagTakenId:Long = Long.getLong(1963608801,-1704957453);
private var _flagTaken_flagIdCodec:ICodec;
private var _flagTaken_tankIdCodec:ICodec;
private var _returnFlagToBaseId:Long = Long.getLong(549926507,-1447996528);
private var _returnFlagToBase_flagIdCodec:ICodec;
private var _returnFlagToBase_tankCodec:ICodec;
private var _throwFlyingFlagId:Long = Long.getLong(476671394,1885696345);
private var _throwFlyingFlag_idCodec:ICodec;
private var _throwFlyingFlag_clientFlagFlyingDataCodec:ICodec;
public function PointBasedBattleModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new PointBasedBattleModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(PointBasedBattleCC,false)));
this._dropFlag_flagIdCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._dropFlag_positionCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._dropFlyingFlag_idCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._dropFlyingFlag_pointIdCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._dropFlyingFlag_fallingDataCodec = this._protocol.getCodec(new TypeCodecInfo(ClientFlagFlyingData,false));
this._exileFlag_idCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._flagDelivered_flagIdCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._flagDelivered_baseIdCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._flagDelivered_delivererTankIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._flagTaken_flagIdCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._flagTaken_tankIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._returnFlagToBase_flagIdCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._returnFlagToBase_tankCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,true));
this._throwFlyingFlag_idCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._throwFlyingFlag_clientFlagFlyingDataCodec = this._protocol.getCodec(new TypeCodecInfo(ClientFlagFlyingData,false));
}
protected function getInitParam() : PointBasedBattleCC {
return PointBasedBattleCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._dropFlagId:
this.client.dropFlag(int(this._dropFlag_flagIdCodec.decode(param2)),Vector3d(this._dropFlag_positionCodec.decode(param2)));
break;
case this._dropFlyingFlagId:
this.client.dropFlyingFlag(int(this._dropFlyingFlag_idCodec.decode(param2)),int(this._dropFlyingFlag_pointIdCodec.decode(param2)),ClientFlagFlyingData(this._dropFlyingFlag_fallingDataCodec.decode(param2)));
break;
case this._exileFlagId:
this.client.exileFlag(int(this._exileFlag_idCodec.decode(param2)));
break;
case this._flagDeliveredId:
this.client.flagDelivered(int(this._flagDelivered_flagIdCodec.decode(param2)),int(this._flagDelivered_baseIdCodec.decode(param2)),Long(this._flagDelivered_delivererTankIdCodec.decode(param2)));
break;
case this._flagTakenId:
this.client.flagTaken(int(this._flagTaken_flagIdCodec.decode(param2)),Long(this._flagTaken_tankIdCodec.decode(param2)));
break;
case this._returnFlagToBaseId:
this.client.returnFlagToBase(int(this._returnFlagToBase_flagIdCodec.decode(param2)),IGameObject(this._returnFlagToBase_tankCodec.decode(param2)));
break;
case this._throwFlyingFlagId:
this.client.throwFlyingFlag(int(this._throwFlyingFlag_idCodec.decode(param2)),ClientFlagFlyingData(this._throwFlyingFlag_clientFlagFlyingDataCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package projects.tanks.client.panel.model.payment.modes.pricerange {
public class PriceRangeCC {
private var _enabled:Boolean;
private var _minimum:Number;
public function PriceRangeCC(param1:Boolean = false, param2:Number = 0) {
super();
this._enabled = param1;
this._minimum = param2;
}
public function get enabled() : Boolean {
return this._enabled;
}
public function set enabled(param1:Boolean) : void {
this._enabled = param1;
}
public function get minimum() : Number {
return this._minimum;
}
public function set minimum(param1:Number) : void {
this._minimum = param1;
}
public function toString() : String {
var local1:String = "PriceRangeCC [";
local1 += "enabled = " + this.enabled + " ";
local1 += "minimum = " + this.minimum + " ";
return local1 + "]";
}
}
}
|
package _codec.projects.tanks.client.panel.model.profile.useremailpassword {
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.profile.useremailpassword.UserEmailCC;
public class CodecUserEmailCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_email:ICodec;
private var codec_emailConfirmed:ICodec;
public function CodecUserEmailCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_email = param1.getCodec(new TypeCodecInfo(String,true));
this.codec_emailConfirmed = param1.getCodec(new TypeCodecInfo(Boolean,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:UserEmailCC = new UserEmailCC();
local2.email = this.codec_email.decode(param1) as String;
local2.emailConfirmed = this.codec_emailConfirmed.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:UserEmailCC = UserEmailCC(param2);
this.codec_email.encode(param1,local3.email);
this.codec_emailConfirmed.encode(param1,local3.emailConfirmed);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.pointbased.flag {
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.battlefield.models.battle.pointbased.flag.FlagState;
public class VectorCodecFlagStateLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecFlagStateLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(FlagState,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.<FlagState> = new Vector.<FlagState>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = FlagState(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:FlagState = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<FlagState> = Vector.<FlagState>(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 forms.friends.list.renderer.background
{
import controls.cellrenderer.ButtonState;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Graphics;
public class FriendCellSelected extends ButtonState
{
[Embed(source="1184.png")]
private static var leftIconClass:Class;
private static var leftIconBitmapData:BitmapData = Bitmap(new leftIconClass()).bitmapData;
[Embed(source="1030.png")]
private static var centerIconClass:Class;
private static var centerIconBitmapData:BitmapData = Bitmap(new centerIconClass()).bitmapData;
[Embed(source="1067.png")]
private static var rightIconClass:Class;
private static var rightIconBitmapData:BitmapData = Bitmap(new rightIconClass()).bitmapData;
public function FriendCellSelected()
{
super();
bmpLeft = leftIconBitmapData;
bmpCenter = centerIconBitmapData;
bmpRight = rightIconBitmapData;
}
override public function draw() : void
{
var _loc1_:Graphics = null;
_loc1_ = l.graphics;
_loc1_.clear();
_loc1_.beginBitmapFill(bmpLeft);
_loc1_.drawRect(0,0,5,20);
_loc1_.endFill();
l.x = 0;
l.y = 0;
_loc1_ = c.graphics;
_loc1_.clear();
_loc1_.beginBitmapFill(bmpCenter);
_loc1_.drawRect(0,0,_width - 10,20);
_loc1_.endFill();
c.x = 5;
c.y = 0;
_loc1_ = r.graphics;
_loc1_.clear();
_loc1_.beginBitmapFill(bmpRight);
_loc1_.drawRect(0,0,5,20);
_loc1_.endFill();
r.x = _width - 5;
r.y = 0;
}
}
}
|
package alternativa.tanks.models.weapon.gauss {
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.objects.tank.WeaponPlatform;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.WeaponConst;
import alternativa.tanks.models.weapon.WeaponForces;
import alternativa.tanks.models.weapon.WeaponObject;
import alternativa.tanks.models.weapon.gauss.sfx.GaussEffects;
import alternativa.tanks.models.weapon.gauss.sfx.GaussSFXData;
import alternativa.tanks.models.weapon.gauss.sfx.GaussShell;
import alternativa.tanks.models.weapon.gauss.sfx.IGaussSFXModel;
import alternativa.tanks.models.weapon.splash.Splash;
import alternativa.tanks.models.weapon.splash.SplashParams;
import alternativa.tanks.models.weapon.weakening.DistanceWeakening;
import projects.tanks.client.battlefield.models.tankparts.weapon.gauss.GaussCC;
import projects.tanks.client.battlefield.models.tankparts.weapon.splash.SplashCC;
public class CommonGaussWeapon {
[Inject]
public static var battleService:BattleService;
protected var gunParams:AllGlobalGunParams = new AllGlobalGunParams();
protected var weaponPlatform:WeaponPlatform;
protected var primaryWeaponForces:WeaponForces;
protected var secondaryWeaponForces:WeaponForces;
protected var weaponObject:WeaponObject;
protected var effects:GaussEffects;
protected var sfxData:GaussSFXData;
private var gaussData:GaussCC;
private var weakening:DistanceWeakening;
private var callback:GaussWeaponCallback;
private var splash:Splash;
protected var enabled:Boolean;
private var secondarySplashParams:SplashParams;
public function CommonGaussWeapon(param1:WeaponObject, param2:GaussCC, param3:GaussWeaponCallback = null) {
super();
this.weaponObject = param1;
this.gaussData = param2;
this.weakening = param1.distanceWeakening();
var local4:IGaussSFXModel = IGaussSFXModel(param1.getObject().adapt(IGaussSFXModel));
this.sfxData = local4.getSFXData();
this.splash = Splash(param1.getObject().adapt(Splash));
this.callback = param3;
this.secondaryWeaponForces = new WeaponForces(param2.aimedShotImpact,param2.aimedShotKickback);
var local5:SplashCC = param2.secondarySplashParams;
this.secondarySplashParams = new SplashParams(BattleUtils.toClientScale(local5.radiusOfMaxSplashDamage),BattleUtils.toClientScale(local5.splashDamageRadius),local5.minSplashDamagePercent,local5.impactForce * WeaponConst.BASE_IMPACT_FORCE.getNumber());
}
public function init(param1:WeaponPlatform) : void {
this.effects = new GaussEffects(this.weaponObject,this.getSkin(),param1,this.sfxData);
}
protected function getSkin() : GaussTurretSkin {
return GaussSkin(this.weaponObject.getObject().adapt(GaussSkin)).getSkin();
}
public function enable() : void {
this.enabled = true;
}
public function disable(param1:Boolean) : void {
this.enabled = false;
}
public function updateRecoilForce(param1:Number) : void {
this.primaryWeaponForces.setRecoilForce(param1);
}
public function applySecondarySplashImpact(param1:Vector3, param2:Body) : void {
this.splash.applySplashForce(param1,1,param2,this.secondarySplashParams);
}
public function getShell() : GaussShell {
var local1:GaussShell = GaussShell(battleService.getObjectPool().getObject(GaussShell));
local1.init(this.primaryWeaponForces.getImpactForce(),this.gaussData,this.sfxData,this.weakening,this.callback,this.splash);
return local1;
}
}
}
|
package org.osflash.signals {
import flash.errors.IllegalOperationError;
import org.osflash.signals.events.IBubbleEventHandler;
import org.osflash.signals.events.IEvent;
[DefaultProperty("valueClasses")]
public class DeluxeSignal implements ISignalOwner, IPrioritySignal {
protected var _target:Object;
protected var _valueClasses:Array;
protected var listenerBoxes:Array;
protected var listenersNeedCloning:Boolean = false;
public function DeluxeSignal(target:Object = null, ... valueClasses) {
super();
this._target = target;
this.listenerBoxes = [];
if(valueClasses.length == 1 && valueClasses[0] is Array) {
valueClasses = valueClasses[0];
}
this.valueClasses = valueClasses;
}
public function get valueClasses() : Array {
return this._valueClasses;
}
public function set valueClasses(value:Array) : void {
this._valueClasses = Boolean(value) ? value.slice() : [];
for(var i:int = int(this._valueClasses.length); Boolean(i--); ) {
if(!(this._valueClasses[i] is Class)) {
throw new ArgumentError("Invalid valueClasses argument: item at index " + i + " should be a Class but was:<" + this._valueClasses[i] + ">.");
}
}
}
public function get numListeners() : uint {
return this.listenerBoxes.length;
}
public function get target() : Object {
return this._target;
}
public function set target(value:Object) : void {
if(value == this._target) {
return;
}
this.removeAll();
this._target = value;
}
public function add(listener:Function) : Function {
return this.addWithPriority(listener);
}
public function addWithPriority(listener:Function, priority:int = 0) : Function {
this.registerListener(listener,false,priority);
return listener;
}
public function addOnce(listener:Function) : Function {
return this.addOnceWithPriority(listener);
}
public function addOnceWithPriority(listener:Function, priority:int = 0) : Function {
this.registerListener(listener,true,priority);
return listener;
}
public function remove(listener:Function) : Function {
if(this.indexOfListener(listener) == -1) {
return listener;
}
if(this.listenersNeedCloning) {
this.listenerBoxes = this.listenerBoxes.slice();
this.listenersNeedCloning = false;
}
this.listenerBoxes.splice(this.indexOfListener(listener),1);
return listener;
}
public function removeAll() : void {
for(var i:uint = this.listenerBoxes.length; Boolean(i--); ) {
this.remove(this.listenerBoxes[i].listener as Function);
}
}
public function dispatch(... valueObjects) : void {
var valueObject:Object = null;
var valueClass:Class = null;
var listener:Function = null;
var listenerBox:Object = null;
var len:int = int(this._valueClasses.length);
for(var i:int = 0; i < len; i++) {
valueObject = valueObjects[i];
if(!(valueObject === null || valueObject is (valueClass = this._valueClasses[i]))) {
throw new ArgumentError("Value object <" + valueObject + "> is not an instance of <" + valueClass + ">.");
}
}
var event:IEvent = valueObjects[0] as IEvent;
if(Boolean(event)) {
if(Boolean(event.target)) {
valueObjects[0] = event = event.clone();
}
event.target = this.target;
event.currentTarget = this.target;
event.signal = this;
}
this.listenersNeedCloning = true;
if(Boolean(this.listenerBoxes.length)) {
for each(listenerBox in this.listenerBoxes) {
listener = listenerBox.listener;
if(Boolean(listenerBox.once)) {
this.remove(listener);
}
listener.apply(null,valueObjects);
}
}
this.listenersNeedCloning = false;
if(!event || !event.bubbles) {
return;
}
var currentTarget:Object = this.target;
while(true) {
currentTarget = currentTarget.parent;
if(!(currentTarget && currentTarget.hasOwnProperty("parent") && (Boolean(currentTarget)))) {
break;
}
if(currentTarget is IBubbleEventHandler) {
if(!IBubbleEventHandler(event.currentTarget = currentTarget).onEventBubbled(event)) {
break;
}
}
}
}
protected function indexOfListener(listener:Function) : int {
for(var i:int = int(this.listenerBoxes.length); Boolean(i--); ) {
if(this.listenerBoxes[i].listener == listener) {
return i;
}
}
return -1;
}
protected function registerListener(listener:Function, once:Boolean = false, priority:int = 0) : void {
var argumentString:String = null;
var prevListenerBox:Object = null;
if(listener.length < this._valueClasses.length) {
argumentString = listener.length == 1 ? "argument" : "arguments";
throw new ArgumentError("Listener has " + listener.length + " " + argumentString + " but it needs at least " + this._valueClasses.length + " to match the given value classes.");
}
var listenerBox:Object = {
"listener":listener,
"once":once,
"priority":priority
};
if(!this.listenerBoxes.length) {
this.listenerBoxes[0] = listenerBox;
return;
}
var prevListenerIndex:int = this.indexOfListener(listener);
if(prevListenerIndex >= 0) {
prevListenerBox = this.listenerBoxes[prevListenerIndex];
if(Boolean(prevListenerBox.once) && !once) {
throw new IllegalOperationError("You cannot addOnce() then add() the same listener without removing the relationship first.");
}
if(!prevListenerBox.once && once) {
throw new IllegalOperationError("You cannot add() then addOnce() the same listener without removing the relationship first.");
}
return;
}
if(this.listenersNeedCloning) {
this.listenerBoxes = this.listenerBoxes.slice();
this.listenersNeedCloning = false;
}
var len:int = int(this.listenerBoxes.length);
for(var i:int = 0; i < len; i++) {
if(priority > this.listenerBoxes[i].priority) {
this.listenerBoxes.splice(i,0,listenerBox);
return;
}
}
this.listenerBoxes[this.listenerBoxes.length] = listenerBox;
}
}
}
|
package alternativa.tanks.model.rankupbonus {
import alternativa.tanks.gui.alerts.RankUpBonusAlert;
import projects.tanks.client.panel.model.rankupbonus.alert.IRankUpBonusAlertPanelModelBase;
import projects.tanks.client.panel.model.rankupbonus.alert.RankUpBonusAlertItem;
import projects.tanks.client.panel.model.rankupbonus.alert.RankUpBonusAlertPanelModelBase;
[ModelInfo]
public class RankUpBonusAlertModel extends RankUpBonusAlertPanelModelBase implements IRankUpBonusAlertPanelModelBase {
public function RankUpBonusAlertModel() {
super();
}
public function showAlert(param1:RankUpBonusAlertItem) : void {
new RankUpBonusAlert(param1.accruedBonusCrystals,param1.alertPictureUrl);
}
}
}
|
package projects.tanks.clients.flash.resources.drone {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/projects.tanks.clients.flash.resources.drone.Drone3D_noBatteriesTexture.png")]
public class Drone3D_noBatteriesTexture extends BitmapAsset {
public function Drone3D_noBatteriesTexture() {
super();
}
}
}
|
package alternativa.tanks.models.weapon.artillery.sfx {
import alternativa.engine3d.objects.Mesh;
import alternativa.math.Vector3;
import alternativa.physics.collision.CollisionDetector;
import alternativa.physics.collision.types.RayHit;
import alternativa.tanks.battle.BattleRunner;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.models.tank.LocalTankInfoService;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.artillery.ArtilleryShell;
import alternativa.tanks.physics.CollisionGroup;
import alternativa.tanks.sfx.AnimatedLightEffect;
import alternativa.tanks.sfx.AnimatedSpriteEffect;
import alternativa.tanks.sfx.Sound3D;
import alternativa.tanks.sfx.Sound3DEffect;
import alternativa.tanks.sfx.StaticObject3DPositionProvider;
import alternativa.tanks.utils.objectpool.ObjectPool;
public class ArtilleryShellEffects {
[Inject]
public static var battleService:BattleService;
[Inject]
public static var localTankService:LocalTankInfoService;
private static const EXPLOSION_OFFSET_TO_CAMERA:Number = 110;
private static const DECAL_RADIUS:Number = 550;
public static const DISTANCE_FOR_TRAIL_SOUND:Number = 3000;
protected static const _rayHit:RayHit = new RayHit();
private const projectionOrigin:Vector3 = new Vector3();
private const explosionDirection:Vector3 = new Vector3();
private const explosionPosition:Vector3 = new Vector3();
private const rayCastDirection:Vector3 = new Vector3();
private var velocity:Vector3 = new Vector3();
private var position:Vector3 = new Vector3();
private var direction:Vector3 = new Vector3();
private var prevPosition:Vector3 = new Vector3();
private var prevDirection:Vector3 = new Vector3();
private var sfxData:ArtillerySfxData;
private var gravity:Number;
private var trailEffect:ArtilleryTrailEffect;
private var checkCollisions:Boolean = true;
public function ArtilleryShellEffects(param1:Mesh, param2:ArtillerySfxData, param3:Vector3, param4:AllGlobalGunParams, param5:Vector3, param6:Number) {
super();
this.sfxData = param2;
this.gravity = param6;
this.velocity.copy(param3);
this.position.copy(param4.muzzlePosition);
this.direction.copy(param5);
this.prevPosition.copy(param4.muzzlePosition);
this.prevDirection.copy(param5);
this.trailEffect = this.createTrailEffect(param1);
this.checkDistance();
}
private function checkDistance() : void {
var local1:int = 0;
while(local1 < 24) {
this.checkCollisions = this.updateShellPosition(true);
if(!this.checkCollisions) {
return;
}
local1++;
}
}
public function updateShellPosition(param1:Boolean = false) : Boolean {
if(!this.checkCollisions) {
return false;
}
ArtilleryShell.moveShell(BattleRunner.PHYSICS_STEP_IN_S,this.position,this.prevPosition,this.direction,this.prevDirection,this.velocity,this.gravity);
this.rayCastDirection.diff(this.position,this.prevPosition);
var local2:Number = this.rayCastDirection.length();
this.rayCastDirection.normalize();
var local3:CollisionDetector = battleService.getBattleRunner().getCollisionDetector();
if(local3.raycastStatic(this.prevPosition,this.rayCastDirection,CollisionGroup.STATIC,local2,null,_rayHit)) {
if(!param1) {
this.checkCollisions = false;
this.createSoundForShell(_rayHit.position);
}
return false;
}
return true;
}
private function createTrailEffect(param1:Mesh) : ArtilleryTrailEffect {
var local2:ArtilleryTrailEffect = ArtilleryTrailEffect(battleService.getObjectPool().getObject(ArtilleryTrailEffect));
local2.init(param1,this.sfxData);
return local2;
}
public function updateTrail(param1:Number) : void {
this.trailEffect.update(param1);
}
public function destroy() : void {
this.trailEffect.close();
this.trailEffect = null;
}
public function createExplosionEffect(param1:Vector3, param2:Vector3) : void {
this.createExplosionGraphicEffect(param1,param2);
this.createExplosionLightEffect(param1);
this.createExplosionSoundEffect(param1);
this.createExplosionMark(param1,param2);
}
private function createExplosionGraphicEffect(param1:Vector3, param2:Vector3) : void {
this.explosionPosition.sum(param1,this.explosionDirection.copy(param2).scale(-155));
var local3:ObjectPool = battleService.getObjectPool();
var local4:StaticObject3DPositionProvider = StaticObject3DPositionProvider(local3.getObject(StaticObject3DPositionProvider));
local4.init(this.explosionPosition,EXPLOSION_OFFSET_TO_CAMERA);
var local5:AnimatedSpriteEffect = AnimatedSpriteEffect(local3.getObject(AnimatedSpriteEffect));
local5.init(1500,1500,this.sfxData.explosion,0,local4,0.5,0.75);
battleService.addGraphicEffect(local5);
}
private function createExplosionLightEffect(param1:Vector3) : void {
var local2:AnimatedLightEffect = AnimatedLightEffect(battleService.getObjectPool().getObject(AnimatedLightEffect));
var local3:StaticObject3DPositionProvider = StaticObject3DPositionProvider(battleService.getObjectPool().getObject(StaticObject3DPositionProvider));
local3.init(param1,EXPLOSION_OFFSET_TO_CAMERA);
local2.init(local3,this.sfxData.hitLightAnimation);
battleService.addGraphicEffect(local2);
}
private function createExplosionSoundEffect(param1:Vector3) : void {
var local2:Sound3D = Sound3D.create(this.sfxData.explosionSound,0.8);
battleService.addSound3DEffect(Sound3DEffect.create(param1,local2));
}
private function createExplosionMark(param1:Vector3, param2:Vector3) : void {
this.projectionOrigin.copy(param1).subtract(param2);
battleService.getBattleScene3D().addDecal(param1,this.projectionOrigin,DECAL_RADIUS,this.sfxData.explosionMarkMaterial);
}
private function createSoundForShell(param1:Vector3) : void {
if(this.shouldPlaySound(param1)) {
this.createTrailSoundEffect(param1);
}
}
public function createTrailSoundEffect(param1:Vector3) : void {
var local2:Sound3D = Sound3D.create(this.sfxData.flyBySound,0.8);
battleService.addSound3DEffect(Sound3DEffect.create(param1,local2));
}
private function shouldPlaySound(param1:Vector3) : Boolean {
return Boolean(localTankService.isLocalTankLoaded()) && this.soundIsNearPlayer(param1);
}
private function soundIsNearPlayer(param1:Vector3) : Boolean {
return Vector3.distanceBetween(param1,localTankService.getLocalTank().getBody().state.position) <= DISTANCE_FOR_TRAIL_SOUND;
}
}
}
|
package alternativa.tanks.model.payment.shop.indemnity {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IndemnityEvents implements Indemnity {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IndemnityEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getIndemnitySize() : int {
var result:int = 0;
var i:int = 0;
var m:Indemnity = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = Indemnity(this.impl[i]);
result = int(m.getIndemnitySize());
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.common.discrete {
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.type.IGameObject;
import projects.tanks.client.battlefield.types.Vector3d;
public class DiscreteWeaponCommunicationModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:DiscreteWeaponCommunicationModelServer;
private var client:IDiscreteWeaponCommunicationModelBase = IDiscreteWeaponCommunicationModelBase(this);
private var modelId:Long = Long.getLong(486222912,-663069007);
private var _shootId:Long = Long.getLong(1666638426,-1858765435);
private var _shoot_shooterCodec:ICodec;
private var _shoot_directionCodec:ICodec;
private var _shoot_targetsCodec:ICodec;
public function DiscreteWeaponCommunicationModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new DiscreteWeaponCommunicationModelServer(IModel(this));
this._shoot_shooterCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._shoot_directionCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._shoot_targetsCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(TargetHit,false),false,1));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._shootId:
this.client.shoot(IGameObject(this._shoot_shooterCodec.decode(param2)),Vector3d(this._shoot_directionCodec.decode(param2)),this._shoot_targetsCodec.decode(param2) as Vector.<TargetHit>);
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangsIcon_p29 extends BitmapAsset
{
public function RangsIcon_p29()
{
super();
}
}
}
|
package alternativa.tanks.model.item.availabledevices {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class AvailableDevicesEvents implements AvailableDevices {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function AvailableDevicesEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function loadDevices() : void {
var i:int = 0;
var m:AvailableDevices = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = AvailableDevices(this.impl[i]);
m.loadDevices();
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.protocol.osgi {
import alternativa.osgi.OSGi;
import alternativa.osgi.bundle.IBundleActivator;
import alternativa.protocol.IProtocol;
import alternativa.protocol.codec.primitive.ByteCodec;
import alternativa.protocol.codec.primitive.DoubleCodec;
import alternativa.protocol.codec.primitive.FloatCodec;
import alternativa.protocol.codec.primitive.IntCodec;
import alternativa.protocol.codec.primitive.LongCodec;
import alternativa.protocol.codec.primitive.ShortCodec;
import alternativa.protocol.codec.primitive.UByteCodec;
import alternativa.protocol.codec.primitive.UIntCodec;
import alternativa.protocol.codec.primitive.UShortCodec;
import alternativa.protocol.impl.Protocol;
import alternativa.types.Byte;
import alternativa.types.Float;
import alternativa.types.Long;
import alternativa.types.Short;
import alternativa.types.UByte;
import alternativa.types.UShort;
public class ProtocolActivator implements IBundleActivator {
public function ProtocolActivator() {
super();
}
public function start(param1:OSGi) : void {
var local2:IProtocol = Protocol.defaultInstance;
param1.registerService(IProtocol,local2);
local2.registerCodecForType(Byte,new ByteCodec());
local2.registerCodecForType(Float,new FloatCodec());
local2.registerCodecForType(Long,new LongCodec());
local2.registerCodecForType(Short,new ShortCodec());
local2.registerCodecForType(UByte,new UByteCodec());
local2.registerCodecForType(UShort,new UShortCodec());
local2.registerCodecForType(uint,new UIntCodec());
local2.registerCodecForType(int,new IntCodec());
local2.registerCodecForType(Number,new DoubleCodec());
}
public function stop(param1:OSGi) : void {
}
}
}
|
package projects.tanks.client.garage.skins {
public interface IAvailableSkinsItemModelBase {
}
}
|
package alternativa.tanks.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class NewReferalWindow_bitmapIconLink extends BitmapAsset
{
public function NewReferalWindow_bitmapIconLink()
{
super();
}
}
}
|
package alternativa.tanks.models.weapon.flamethrower {
public class FlamethrowerEffectsParams {
public static const FLAME_MUZZLE_OFFSET:Number = 90;
public static const FLAME_MUZZLE_RANDOM_OFFSET:Number = 40;
public static const PLANE_LENGTH:int = 300;
public static const PLANE_WIDTH:int = 100;
public static const PARTICLE_START_SIZE:Number = 50;
public static const PARTICLE_END_SIZE:Number = 400;
public static const PARTICLE_SPEED_PER_DISTANCE_METER:Number = 100;
public static const SOUND_VOLUME:Number = 1;
public static const FIRE_LIGHT_OFFSET:int = 1500;
public function FlamethrowerEffectsParams() {
super();
}
}
}
|
package _codec.projects.tanks.client.commons.models.captcha {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.EnumCodecInfo;
import projects.tanks.client.commons.models.captcha.CaptchaLocation;
public class VectorCodecCaptchaLocationLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecCaptchaLocationLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(CaptchaLocation,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.<CaptchaLocation> = new Vector.<CaptchaLocation>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = CaptchaLocation(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:CaptchaLocation = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<CaptchaLocation> = Vector.<CaptchaLocation>(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.device {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.device.DeviceButtonSkin_overStateClass.png")]
public class DeviceButtonSkin_overStateClass extends BitmapAsset {
public function DeviceButtonSkin_overStateClass() {
super();
}
}
}
|
package projects.tanks.clients.fp10.models.tankspartnersmodel.guestform {
import alternativa.startup.CacheLoader;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.net.URLRequest;
import flash.system.LoaderContext;
public class GuestForm extends Sprite {
private static const ttfFont:Class = GuestForm_ttfFont;
private var backgroundImageBitmap:Bitmap;
private var normalBitmap:Bitmap;
private var overBitmap:Bitmap;
private var logoBitmap:BitmapData;
private var logoAlphaBitmap:BitmapData;
private var urls:Vector.<String> = new Vector.<String>();
private var loader:CacheLoader;
private var urlsCounter:int = -1;
private var stageWidth:int;
private var stageHeight:int;
private var background:BackgroundImage;
private var backgoundFill:BackgroundFill;
private var logo:TankiLogo;
private var buttonStart:Button;
private var buttonHandler:Function;
public function GuestForm(param1:Function) {
super();
this.urls.push("background.jpg");
this.urls.push("button_normal.png");
this.urls.push("button_over.png");
this.urls.push("logo.jpg");
this.urls.push("alpha.jpg");
this.buttonHandler = param1;
this.loadNextBMP();
}
private function loadNextBMP(param1:Event = null) : void {
var local2:Bitmap = null;
var local3:String = null;
var local4:LoaderContext = null;
if(this.urlsCounter >= 0 && !(param1 is ErrorEvent)) {
local2 = this.loader.content as Bitmap;
local3 = this.urls[this.urlsCounter];
if(local3.indexOf("logo") >= 0) {
this.logoBitmap = local2.bitmapData;
} else if(local3.indexOf("alpha") >= 0) {
this.logoAlphaBitmap = local2.bitmapData;
} else if(local3.indexOf("background") >= 0) {
this.backgroundImageBitmap = local2;
} else if(local3.indexOf("normal") >= 0) {
this.normalBitmap = local2;
} else if(local3.indexOf("over") >= 0) {
this.overBitmap = local2;
}
}
if(++this.urlsCounter < this.urls.length) {
this.loader = new CacheLoader();
this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadNextBMP);
this.loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,this.loadNextBMP);
this.loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.loadNextBMP);
local4 = new LoaderContext(true);
if("imageDecodingPolicy" in local4) {
local4["imageDecodingPolicy"] = "onLoad";
}
this.loader.load(new URLRequest(this.urls[this.urlsCounter]),local4);
} else {
this.init();
}
}
private function init(param1:Event = null) : void {
this.backgoundFill = new BackgroundFill();
addChild(this.backgoundFill);
this.background = new BackgroundImage(this.backgroundImageBitmap);
addChild(this.background);
this.logo = new TankiLogo(this.logoBitmap,this.logoAlphaBitmap);
addChild(this.logo);
this.buttonStart = new Button(this.normalBitmap,this.overBitmap,this.buttonHandler);
addChild(this.buttonStart);
if(stage != null) {
stage.addEventListener(Event.RESIZE,this.onResize);
stage.addEventListener(Event.REMOVED_FROM_STAGE,this.onRemovedFromStage);
this.resize(stage.stageWidth,stage.stageHeight);
}
}
private function onRemovedFromStage(param1:Event) : void {
stage.removeEventListener(Event.RESIZE,this.onResize);
stage.removeEventListener(Event.REMOVED_FROM_STAGE,this.onRemovedFromStage);
}
private function onResize(param1:Event) : void {
if(stage != null) {
this.resize(stage.stageWidth,stage.stageHeight);
}
}
public function resize(param1:int, param2:int) : void {
if(this.backgoundFill != null) {
this.backgoundFill.redraw(param1,param2);
this.background.resposition(param1,param2);
this.logo.reposition(param1,param2);
this.buttonStart.reposition(param1,param2);
}
this.stageWidth = param1;
this.stageHeight = param2;
}
}
}
|
package projects.tanks.client.panel.model.payment.modes.alipay {
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 AlipayPaymentModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _getPaymentUrlId:Long = Long.getLong(2073033764,87600040);
private var _getPaymentUrl_shopItemIdCodec:ICodec;
private var model:IModel;
public function AlipayPaymentModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
this._getPaymentUrl_shopItemIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false));
}
public function getPaymentUrl(param1:Long) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._getPaymentUrl_shopItemIdCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._getPaymentUrlId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.tanks.model.payment.shop.description {
import projects.tanks.client.panel.model.shop.description.IShopItemAdditionalDescriptionModelBase;
import projects.tanks.client.panel.model.shop.description.ShopItemAdditionalDescriptionModelBase;
[ModelInfo]
public class ShopItemAdditionalDescriptionModel extends ShopItemAdditionalDescriptionModelBase implements IShopItemAdditionalDescriptionModelBase, ShopItemAdditionalDescription {
public function ShopItemAdditionalDescriptionModel() {
super();
}
public function getAdditionalDescription() : String {
return getInitParam().additionalDescription;
}
}
}
|
package projects.tanks.clients.fp10.Prelauncher.makeup {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/projects.tanks.clients.fp10.Prelauncher.makeup.MakeUp_tournamentsIconMakeUp.png")]
public class MakeUp_tournamentsIconMakeUp extends BitmapAsset {
public function MakeUp_tournamentsIconMakeUp() {
super();
}
}
}
|
package projects.tanks.client.panel.model.shop.specialkit {
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 SpecialKitPackageModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function SpecialKitPackageModelServer(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 controls.buttons.h71px {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.buttons.h71px.GreyHugeButtonSkin_leftDownClass.png")]
public class GreyHugeButtonSkin_leftDownClass extends BitmapAsset {
public function GreyHugeButtonSkin_leftDownClass() {
super();
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapBigRank04.png")]
public class PremiumRankBitmaps_bitmapBigRank04 extends BitmapAsset {
public function PremiumRankBitmaps_bitmapBigRank04() {
super();
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.messages {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.messages.ActionOutputLine_ctfBluePlayerDropRedflagIcon.png")]
public class ActionOutputLine_ctfBluePlayerDropRedflagIcon extends BitmapAsset {
public function ActionOutputLine_ctfBluePlayerDropRedflagIcon() {
super();
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.friend {
import alternativa.types.Long;
import flash.events.Event;
public class FriendActionServiceEvent extends Event {
public static const ADD:String = "FriendsActionServiceEvent.ADD";
public static const ACCEPT:String = "FriendsActionServiceEvent.ACCEPT";
public static const BREAK_OFF:String = "FriendsActionServiceEvent.BREAK_OFF";
public static const REJECT:String = "FriendsActionServiceEvent.REJECT";
public static const REJECT_ALL_INCOMING:String = "FriendsActionServiceEvent.REJECT_ALL_INCOMING";
public var userId:Long;
public function FriendActionServiceEvent(param1:String, param2:Long, param3:Boolean = false, param4:Boolean = false) {
super(param1,param3,param4);
this.userId = param2;
}
}
}
|
package alternativa.physics.collision
{
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.physics.Contact;
import alternativa.physics.altphysics;
import alternativa.physics.collision.colliders.BoxBoxCollider;
import alternativa.physics.collision.colliders.BoxRectCollider;
import alternativa.physics.collision.colliders.BoxSphereCollider;
import alternativa.physics.collision.colliders.BoxTriangleCollider;
import alternativa.physics.collision.colliders.SphereSphereCollider;
import alternativa.physics.collision.types.BoundBox;
import alternativa.physics.collision.types.RayIntersection;
use namespace altphysics;
public class KdTreeCollisionDetector implements ICollisionDetector
{
private static var _rayAABB:BoundBox = new BoundBox();
altphysics var tree:CollisionKdTree;
altphysics var dynamicPrimitives:Vector.<CollisionPrimitive>;
altphysics var dynamicPrimitivesNum:int;
altphysics var threshold:Number = 1.0E-4;
private var colliders:Object;
private var _time:MinMax;
private var _n:Vector3;
private var _o:Vector3;
private var _dynamicIntersection:RayIntersection;
public function KdTreeCollisionDetector()
{
this.colliders = {};
this._time = new MinMax();
this._n = new Vector3();
this._o = new Vector3();
this._dynamicIntersection = new RayIntersection();
super();
this.tree = new CollisionKdTree();
this.dynamicPrimitives = new Vector.<CollisionPrimitive>();
this.addCollider(CollisionPrimitive.BOX,CollisionPrimitive.BOX,new BoxBoxCollider());
this.addCollider(CollisionPrimitive.BOX,CollisionPrimitive.SPHERE,new BoxSphereCollider());
this.addCollider(CollisionPrimitive.BOX,CollisionPrimitive.RECT,new BoxRectCollider());
this.addCollider(CollisionPrimitive.BOX,CollisionPrimitive.TRIANGLE,new BoxTriangleCollider());
this.addCollider(CollisionPrimitive.SPHERE,CollisionPrimitive.SPHERE,new SphereSphereCollider());
}
public function addPrimitive(primitive:CollisionPrimitive, isStatic:Boolean = true) : Boolean
{
return true;
}
public function removePrimitive(primitive:CollisionPrimitive, isStatic:Boolean = true) : Boolean
{
return true;
}
public function init(collisionPrimitives:Vector.<CollisionPrimitive>) : void
{
this.tree.createTree(collisionPrimitives);
}
public function getAllContacts(contacts:Contact) : Contact
{
return null;
}
public function getContact(prim1:CollisionPrimitive, prim2:CollisionPrimitive, contact:Contact) : Boolean
{
if((prim1.collisionGroup & prim2.collisionGroup) == 0)
{
return false;
}
if(prim1.body != null && prim1.body == prim2.body)
{
return false;
}
if(!prim1.aabb.intersects(prim2.aabb,0.01))
{
return false;
}
var collider:ICollider = this.colliders[prim1.type <= prim2.type ? prim1.type << 16 | prim2.type : prim2.type << 16 | prim1.type] as ICollider;
if(collider != null && collider.getContact(prim1,prim2,contact))
{
if(prim1.postCollisionPredicate != null && !prim1.postCollisionPredicate.considerCollision(prim2))
{
return false;
}
if(prim2.postCollisionPredicate != null && !prim2.postCollisionPredicate.considerCollision(prim1))
{
return false;
}
return true;
}
return false;
}
public function testCollision(prim1:CollisionPrimitive, prim2:CollisionPrimitive) : Boolean
{
if((prim1.collisionGroup & prim2.collisionGroup) == 0)
{
return false;
}
if(prim1.body != null && prim1.body == prim2.body)
{
return false;
}
if(!prim1.aabb.intersects(prim2.aabb,0.01))
{
return false;
}
var collider:ICollider = this.colliders[prim1.type <= prim2.type ? prim1.type << 16 | prim2.type : prim2.type << 16 | prim1.type] as ICollider;
if(collider != null && collider.haveCollision(prim1,prim2))
{
if(prim1.postCollisionPredicate != null && !prim1.postCollisionPredicate.considerCollision(prim2))
{
return false;
}
if(prim2.postCollisionPredicate != null && !prim2.postCollisionPredicate.considerCollision(prim1))
{
return false;
}
return true;
}
return false;
}
public function intersectRay(origin:Vector3, dir:Vector3, collisionGroup:int, maxTime:Number, predicate:IRayCollisionPredicate, result:RayIntersection) : Boolean
{
var hasStaticIntersection:Boolean = this.intersectRayWithStatic(origin,dir,collisionGroup,maxTime,predicate,result);
var hasDynamicIntersection:Boolean = this.intersectRayWithDynamic(origin,dir,collisionGroup,maxTime,predicate,this._dynamicIntersection);
if(!(hasDynamicIntersection || hasStaticIntersection))
{
return false;
}
if(hasDynamicIntersection && hasStaticIntersection)
{
if(result.t > this._dynamicIntersection.t)
{
result.copy(this._dynamicIntersection);
}
return true;
}
if(hasStaticIntersection)
{
return true;
}
result.copy(this._dynamicIntersection);
return true;
}
public function intersectRayWithStatic(origin:Vector3, dir:Vector3, collisionGroup:int, maxTime:Number, predicate:IRayCollisionPredicate, result:RayIntersection) : Boolean
{
if(!this.getRayBoundBoxIntersection(origin,dir,this.tree.rootNode.boundBox,this._time))
{
return false;
}
if(this._time.max < 0 || this._time.min > maxTime)
{
return false;
}
if(this._time.min <= 0)
{
this._time.min = 0;
this._o.x = origin.x;
this._o.y = origin.y;
this._o.z = origin.z;
}
else
{
this._o.x = origin.x + this._time.min * dir.x;
this._o.y = origin.y + this._time.min * dir.y;
this._o.z = origin.z + this._time.min * dir.z;
}
if(this._time.max > maxTime)
{
this._time.max = maxTime;
}
var hasIntersection:Boolean = this.testRayAgainstNode(this.tree.rootNode,origin,this._o,dir,collisionGroup,this._time.min,this._time.max,predicate,result);
return !!hasIntersection ? Boolean(Boolean(result.t <= maxTime)) : Boolean(Boolean(false));
}
public function testBodyPrimitiveCollision(body:Body, primitive:CollisionPrimitive) : Boolean
{
return false;
}
private function addCollider(type1:int, type2:int, collider:ICollider) : void
{
this.colliders[type1 <= type2 ? type1 << 16 | type2 : type2 << 16 | type1] = collider;
}
private function getPrimitiveNodeCollisions(node:CollisionKdNode, primitive:CollisionPrimitive, contacts:Contact) : Contact
{
return null;
}
private function intersectRayWithDynamic(origin:Vector3, dir:Vector3, collisionGroup:int, maxTime:Number, predicate:IRayCollisionPredicate, result:RayIntersection) : Boolean
{
var minTime:Number = NaN;
minTime = NaN;
var primitive:CollisionPrimitive = null;
var paabb:BoundBox = null;
var t:Number = NaN;
var xx:Number = origin.x + dir.x * maxTime;
var yy:Number = origin.y + dir.y * maxTime;
var zz:Number = origin.z + dir.z * maxTime;
if(xx < origin.x)
{
_rayAABB.minX = xx;
_rayAABB.maxX = origin.x;
}
else
{
_rayAABB.minX = origin.x;
_rayAABB.maxX = xx;
}
if(yy < origin.y)
{
_rayAABB.minY = yy;
_rayAABB.maxY = origin.y;
}
else
{
_rayAABB.minY = origin.y;
_rayAABB.maxY = yy;
}
if(zz < origin.z)
{
_rayAABB.minZ = zz;
_rayAABB.maxZ = origin.z;
}
else
{
_rayAABB.minZ = origin.z;
_rayAABB.maxZ = zz;
}
minTime = maxTime + 1;
for(var i:int = 0; i < this.dynamicPrimitivesNum; i++)
{
primitive = this.dynamicPrimitives[i];
if((primitive.collisionGroup & collisionGroup) != 0)
{
paabb = primitive.aabb;
if(!(_rayAABB.maxX < paabb.minX || _rayAABB.minX > paabb.maxX || _rayAABB.maxY < paabb.minY || _rayAABB.minY > paabb.maxY || _rayAABB.maxZ < paabb.minZ || _rayAABB.minZ > paabb.maxZ))
{
if(!(predicate != null && primitive.body != null && !predicate.considerBody(primitive.body)))
{
t = primitive.getRayIntersection(origin,dir,this.threshold,this._n);
if(t > 0 && t < minTime)
{
minTime = t;
result.primitive = primitive;
result.normal.x = this._n.x;
result.normal.y = this._n.y;
result.normal.z = this._n.z;
}
}
}
}
}
if(minTime > maxTime)
{
return false;
}
result.pos.x = origin.x + dir.x * minTime;
result.pos.y = origin.y + dir.y * minTime;
result.pos.z = origin.z + dir.z * minTime;
result.t = minTime;
return true;
}
private function getRayBoundBoxIntersection(origin:Vector3, dir:Vector3, bb:BoundBox, time:MinMax) : Boolean
{
var t1:Number = NaN;
var t2:Number = NaN;
time.min = -1;
time.max = 1e+308;
for(var i:int = 0; i < 3; i++)
{
switch(i)
{
case 0:
if(!(dir.x < this.threshold && dir.x > -this.threshold))
{
t1 = (bb.minX - origin.x) / dir.x;
t2 = (bb.maxX - origin.x) / dir.x;
break;
}
if(origin.x < bb.minX || origin.x > bb.maxX)
{
return false;
}
continue;
case 1:
if(!(dir.y < this.threshold && dir.y > -this.threshold))
{
t1 = (bb.minY - origin.y) / dir.y;
t2 = (bb.maxY - origin.y) / dir.y;
break;
}
if(origin.y < bb.minY || origin.y > bb.maxY)
{
return false;
}
continue;
case 2:
if(!(dir.z < this.threshold && dir.z > -this.threshold))
{
t1 = (bb.minZ - origin.z) / dir.z;
t2 = (bb.maxZ - origin.z) / dir.z;
}
if(origin.z < bb.minZ || origin.z > bb.maxZ)
{
return false;
}
continue;
}
if(t1 < t2)
{
if(t1 > time.min)
{
time.min = t1;
}
if(t2 < time.max)
{
time.max = t2;
}
}
else
{
if(t2 > time.min)
{
time.min = t2;
}
if(t1 < time.max)
{
time.max = t1;
}
}
if(time.max < time.min)
{
return false;
}
}
return true;
}
private function testRayAgainstNode(node:CollisionKdNode, origin:Vector3, localOrigin:Vector3, dir:Vector3, collisionGroup:int, t1:Number, t2:Number, predicate:IRayCollisionPredicate, result:RayIntersection) : Boolean
{
var splitTime:Number = NaN;
var currChildNode:CollisionKdNode = null;
var intersects:Boolean = false;
if(node.indices != null && this.getRayNodeIntersection(origin,dir,collisionGroup,this.tree.staticChildren,node.indices,predicate,result))
{
return true;
}
if(node.axis == -1)
{
return false;
}
switch(node.axis)
{
case 0:
if(dir.x > -this.threshold && dir.x < this.threshold)
{
splitTime = t2 + 1;
}
else
{
splitTime = (node.coord - origin.x) / dir.x;
}
currChildNode = localOrigin.x < node.coord ? node.negativeNode : node.positiveNode;
break;
case 1:
if(dir.y > -this.threshold && dir.y < this.threshold)
{
splitTime = t2 + 1;
}
else
{
splitTime = (node.coord - origin.y) / dir.y;
}
currChildNode = localOrigin.y < node.coord ? node.negativeNode : node.positiveNode;
break;
case 2:
if(dir.z > -this.threshold && dir.z < this.threshold)
{
splitTime = t2 + 1;
}
else
{
splitTime = (node.coord - origin.z) / dir.z;
}
currChildNode = localOrigin.z < node.coord ? node.negativeNode : node.positiveNode;
}
if(splitTime < t1 || splitTime > t2)
{
return this.testRayAgainstNode(currChildNode,origin,localOrigin,dir,collisionGroup,t1,t2,predicate,result);
}
intersects = this.testRayAgainstNode(currChildNode,origin,localOrigin,dir,collisionGroup,t1,splitTime,predicate,result);
if(intersects)
{
return true;
}
this._o.x = origin.x + splitTime * dir.x;
this._o.y = origin.y + splitTime * dir.y;
this._o.z = origin.z + splitTime * dir.z;
return this.testRayAgainstNode(currChildNode == node.negativeNode ? node.positiveNode : node.negativeNode,origin,this._o,dir,collisionGroup,splitTime,t2,predicate,result);
}
private function getRayNodeIntersection(origin:Vector3, dir:Vector3, collisionGroup:int, primitives:Vector.<CollisionPrimitive>, indices:Vector.<int>, predicate:IRayCollisionPredicate, intersection:RayIntersection) : Boolean
{
var minTime:Number = NaN;
var primitive:CollisionPrimitive = null;
var t:Number = NaN;
var pnum:int = indices.length;
minTime = 1e+308;
for(var i:int = 0; i < pnum; i++)
{
primitive = primitives[indices[i]];
if((primitive.collisionGroup & collisionGroup) != 0)
{
if(!(predicate != null && primitive.body != null && !predicate.considerBody(primitive.body)))
{
t = primitive.getRayIntersection(origin,dir,this.threshold,this._n);
if(t > 0 && t < minTime)
{
minTime = t;
intersection.primitive = primitive;
intersection.normal.x = this._n.x;
intersection.normal.y = this._n.y;
intersection.normal.z = this._n.z;
}
}
}
}
if(minTime == 1e+308)
{
return false;
}
intersection.pos.x = origin.x + dir.x * minTime;
intersection.pos.y = origin.y + dir.y * minTime;
intersection.pos.z = origin.z + dir.z * minTime;
intersection.t = minTime;
return true;
}
public function destroy() : void
{
var c:ICollider = null;
for each(c in this.colliders)
{
c.destroy();
c = null;
}
}
}
}
class MinMax
{
public var min:Number = 0;
public var max:Number = 0;
function MinMax()
{
super();
}
}
|
package alternativa.tanks.gui.shop.shopitems.item {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.shop.shopitems.event.ShopItemChosen;
import alternativa.tanks.gui.shop.shopitems.item.base.ShopButton;
import alternativa.tanks.gui.shop.shopitems.item.base.ShopItemSkins;
import controls.base.LabelBase;
import flash.display.Bitmap;
import flash.events.MouseEvent;
import flash.text.TextFieldAutoSize;
import forms.ColorConstants;
import platform.client.fp10.core.resource.types.ImageResource;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.fp10.libraries.tanksservices.utils.LocaleServiceLangValues;
import utils.preview.IImageResource;
import utils.preview.ImageResourceLoadingWrapper;
public class OtherShopItemButton extends ShopButton implements IImageResource {
[Inject]
public static var localeService:ILocaleService;
protected static const PADDING:int = 17;
private var nameLabel:LabelBase;
protected var preview:Bitmap;
private var text:String;
private var previewResource:ImageResource;
private var sendingObject:IGameObject;
public function OtherShopItemButton(param1:IGameObject, param2:String, param3:ImageResource = null) {
this.sendingObject = param1;
addEventListener(MouseEvent.CLICK,this.onMouseClick);
this.text = param2;
this.previewResource = param3;
super(ShopItemSkins.GREY);
}
override protected function init() : void {
super.init();
this.initImageResourceForPreview();
this.initLabels();
this.initPreview();
this.align();
}
protected function initPreview() : void {
if(this.preview != null) {
this.setPreview();
}
}
protected function setPreview() : void {
addChildAt(this.preview,2);
}
private function initLabels() : void {
this.nameLabel = new LabelBase();
this.nameLabel.text = this.text;
this.nameLabel.color = ColorConstants.SHOP_CRYSTALS_TEXT_LABEL_COLOR;
this.nameLabel.size = localeService.language == LocaleServiceLangValues.CN ? 18 : 22;
this.nameLabel.autoSize = TextFieldAutoSize.LEFT;
this.nameLabel.bold = true;
this.nameLabel.mouseEnabled = false;
this.nameLabel.wordWrap = true;
this.nameLabel.width = this.width / 2;
addChild(this.nameLabel);
}
private function initImageResourceForPreview() : void {
if(this.previewResource != null) {
if(this.previewResource.isLazy && !this.previewResource.isLoaded) {
this.previewResource.loadLazyResource(new ImageResourceLoadingWrapper(this));
} else {
this.preview = new Bitmap(this.previewResource.data);
}
}
}
protected function align() : void {
this.nameLabel.y = this.height / 2 - this.nameLabel.height / 2;
this.nameLabel.x = PADDING;
if(this.preview != null) {
this.preview.x = this.width - PADDING - 150;
this.preview.y = 12;
}
}
protected function onMouseClick(param1:MouseEvent) : void {
dispatchEvent(new ShopItemChosen(this.sendingObject));
}
public function setPreviewResource(param1:ImageResource) : void {
this.preview = new Bitmap(param1.data);
this.updateLazyLoadedPreview();
}
protected function updateLazyLoadedPreview() : void {
this.setPreview();
this.align();
}
}
}
|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_bitmapTurretRotationRate.png")]
public class ItemInfoPanelBitmaps_bitmapTurretRotationRate extends BitmapAsset {
public function ItemInfoPanelBitmaps_bitmapTurretRotationRate() {
super();
}
}
}
|
package alternativa.tanks.models.battle.commonflag {
import alternativa.engine3d.core.Object3D;
import alternativa.math.Vector3;
import alternativa.tanks.battle.objects.tank.Tank;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.battle.pointbased.ClientTeamPoint;
import projects.tanks.client.battlefield.models.battle.pointbased.flag.ClientFlag;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class ICommonFlagModeModelEvents implements ICommonFlagModeModel {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function ICommonFlagModeModelEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function initFlag(param1:CommonFlag, param2:ClientFlag) : void {
var i:int = 0;
var m:ICommonFlagModeModel = null;
var flag:CommonFlag = param1;
var flagData:ClientFlag = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ICommonFlagModeModel(this.impl[i]);
m.initFlag(flag,flagData);
i++;
}
}
finally {
Model.popObject();
}
}
public function createBasePoint(param1:ClientTeamPoint, param2:Tanks3DSResource) : Object3D {
var result:Object3D = null;
var i:int = 0;
var m:ICommonFlagModeModel = null;
var pointData:ClientTeamPoint = param1;
var pedestal3D:Tanks3DSResource = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ICommonFlagModeModel(this.impl[i]);
result = m.createBasePoint(pointData,pedestal3D);
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function getFlags() : Vector.<ClientFlag> {
var result:Vector.<ClientFlag> = null;
var i:int = 0;
var m:ICommonFlagModeModel = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ICommonFlagModeModel(this.impl[i]);
result = m.getFlags();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function getPoints() : Vector.<ClientTeamPoint> {
var result:Vector.<ClientTeamPoint> = null;
var i:int = 0;
var m:ICommonFlagModeModel = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ICommonFlagModeModel(this.impl[i]);
result = m.getPoints();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function getLocalTank() : Tank {
var result:Tank = null;
var i:int = 0;
var m:ICommonFlagModeModel = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ICommonFlagModeModel(this.impl[i]);
result = m.getLocalTank();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function onFlagTouch(param1:CommonFlag) : void {
var i:int = 0;
var m:ICommonFlagModeModel = null;
var flag:CommonFlag = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ICommonFlagModeModel(this.impl[i]);
m.onFlagTouch(flag);
i++;
}
}
finally {
Model.popObject();
}
}
public function onPickupTimeoutPassed(param1:CommonFlag) : void {
var i:int = 0;
var m:ICommonFlagModeModel = null;
var flag:CommonFlag = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ICommonFlagModeModel(this.impl[i]);
m.onPickupTimeoutPassed(flag);
i++;
}
}
finally {
Model.popObject();
}
}
public function addMineProtectedZone(param1:Vector3) : void {
var i:int = 0;
var m:ICommonFlagModeModel = null;
var position:Vector3 = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ICommonFlagModeModel(this.impl[i]);
m.addMineProtectedZone(position);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package controls.chat
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ChatPermissionsLevel_event extends BitmapAsset
{
public function ChatPermissionsLevel_event()
{
super();
}
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangsIcon_p15 extends BitmapAsset
{
public function RangsIcon_p15()
{
super();
}
}
}
|
package alternativa.osgi.service.network {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.logging.LogService;
import alternativa.startup.ConnectionParameters;
import flash.net.SharedObject;
public class NetworkService implements INetworkService {
private static const SHARED_OBJECT_NAME:String = "connection";
private var logService:LogService;
private var _controlServerAddress:String;
private var _controlServerPorts:Vector.<int>;
private var _resourcesRootUrl:String;
private var _secure:Boolean;
public function NetworkService(param1:ConnectionParameters) {
super();
this._controlServerAddress = param1.serverAddress;
this._controlServerPorts = param1.serverPorts;
this._resourcesRootUrl = param1.resourcesRootURL;
this._secure = param1.secure;
this.logService = LogService(OSGi.getInstance().getService(LogService));
}
public function get controlServerAddress() : String {
return this._controlServerAddress;
}
public function get secure() : Boolean {
return this._secure;
}
public function get controlServerPorts() : Vector.<int> {
return this._controlServerPorts;
}
public function get resourcesRootUrl() : String {
return this._resourcesRootUrl;
}
public function getLastPort(param1:String) : int {
var local2:SharedObject = SharedObject.getLocal(SHARED_OBJECT_NAME,"/");
return local2.data[param1];
}
public function saveLastPort(param1:String, param2:int) : void {
var so:SharedObject = null;
var host:String = param1;
var port:int = param2;
try {
so = SharedObject.getLocal(SHARED_OBJECT_NAME,"/");
so.data[host] = port;
so.flush();
}
catch(e:Error) {
logService.getLogger("NetworkServer").warning("Error stored port in shared object, message = %1",[e]);
}
}
}
}
|
package alternativa.tanks.model.challenge
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ChallengeCongratulationWindow_stormBitmap extends BitmapAsset
{
public function ChallengeCongratulationWindow_stormBitmap()
{
super();
}
}
}
|
package alternativa.tanks.utils {
import flash.utils.ByteArray;
public class ConstEncryptedNumber implements EncryptedNumber {
private static var byteArray:ByteArray = new ByteArray();
private var mask:int;
private var v1:int;
private var v2:int;
public function ConstEncryptedNumber(param1:Number) {
super();
this.mask = Math.random() * 4294967295;
byteArray.position = 0;
byteArray.writeDouble(param1);
byteArray.position = 0;
this.v1 = byteArray.readInt() ^ this.mask;
this.v2 = byteArray.readInt() ^ this.mask;
}
public function setNumber(param1:Number) : void {
}
public function getNumber() : Number {
byteArray.position = 0;
byteArray.writeInt(this.v1 ^ this.mask);
byteArray.writeInt(this.v2 ^ this.mask);
byteArray.position = 0;
return byteArray.readDouble();
}
}
}
|
package alternativa.tanks.model.garage.resistance {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.model.garage.resistance.ResistancesIcons_gaussResistanceClass.png")]
public class ResistancesIcons_gaussResistanceClass extends BitmapAsset {
public function ResistancesIcons_gaussResistanceClass() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.battle.jgr {
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 JuggernautModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function JuggernautModelServer(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 forms.buttons
{
import flash.display.Bitmap;
public class MainPanelDonateButton extends MainPanelWideButton
{
[Embed(source="892.png")]
private static const iconN:Class;
private static const overBtn:Class = MainPanelDonateButton_overBtn;
[Embed(source="816.png")]
private static const normalBtn:Class;
public function MainPanelDonateButton()
{
super(new Bitmap(new iconN().bitmapData),3,3,new Bitmap(new overBtn().bitmapData),new Bitmap(new normalBtn().bitmapData));
}
}
}
|
package alternativa.tanks.models.battle.battlefield.keyboard {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_damagenanobotsIconClass.png")]
public class DeviceIcons_damagenanobotsIconClass extends BitmapAsset {
public function DeviceIcons_damagenanobotsIconClass() {
super();
}
}
}
|
package forms.friends.list.renderer
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class FriendsAcceptedListRenderer_gradientGreyIconClass extends BitmapAsset
{
public function FriendsAcceptedListRenderer_gradientGreyIconClass()
{
super();
}
}
}
|
package alternativa.physics.collision.types {
import alternativa.math.Vector3;
import alternativa.physics.collision.CollisionShape;
public class RayHit {
public var shape:CollisionShape;
public var position:Vector3 = new Vector3();
public var normal:Vector3 = new Vector3();
public var t:Number = 0;
public var staticHit:Boolean;
public function RayHit() {
super();
}
public function copy(param1:RayHit) : void {
this.shape = param1.shape;
this.position.copy(param1.position);
this.normal.copy(param1.normal);
this.t = param1.t;
this.staticHit = param1.staticHit;
}
public function clear() : void {
this.shape = null;
}
public function clone() : RayHit {
var local1:RayHit = new RayHit();
local1.copy(this);
return local1;
}
}
}
|
package controls.scroller.green {
public class ScrollSkinGreen {
public static const thumbTop:Class = ScrollSkinGreen_thumbTop;
public static const thumbMiddle:Class = ScrollSkinGreen_thumbMiddle;
public static const track:Class = ScrollSkinGreen_track;
public static const trackTop:Class = ScrollSkinGreen_trackTop;
public static const trackBottom:Class = ScrollSkinGreen_trackBottom;
public function ScrollSkinGreen() {
super();
}
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangsIcon_p21 extends BitmapAsset
{
public function RangsIcon_p21()
{
super();
}
}
}
|
package _codec.projects.tanks.client.tanksservices.model.rankloader {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.tanksservices.model.rankloader.RankInfo;
public class VectorCodecRankInfoLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecRankInfoLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(RankInfo,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.<RankInfo> = new Vector.<RankInfo>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = RankInfo(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:RankInfo = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<RankInfo> = Vector.<RankInfo>(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.chat.models.chat.users.personalmessagereceiver {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import projects.tanks.client.chat.models.chat.users.personalmessagereceiver.PersonalMessageReceiveMode;
public class CodecPersonalMessageReceiveMode implements ICodec {
public function CodecPersonalMessageReceiveMode() {
super();
}
public function init(param1:IProtocol) : void {
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:PersonalMessageReceiveMode = null;
var local3:int = int(param1.reader.readInt());
switch(local3) {
case 0:
local2 = PersonalMessageReceiveMode.ALL;
break;
case 1:
local2 = PersonalMessageReceiveMode.FRIENDS_ONLY;
break;
case 2:
local2 = PersonalMessageReceiveMode.NONE;
}
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 projects.tanks.client.garage.models.item.grouped {
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 GroupedItemModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function GroupedItemModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package projects.tanks.client.battlefield.models.battle.cp {
import projects.tanks.client.battlefield.models.battle.cp.resources.DominationResources;
import projects.tanks.client.battlefield.models.battle.cp.resources.DominationSounds;
public class ControlPointsCC {
private var _keypointTriggerRadius:Number;
private var _keypointVisorHeight:Number;
private var _minesRestrictionRadius:Number;
private var _points:Vector.<ClientPointData>;
private var _resources:DominationResources;
private var _sounds:DominationSounds;
public function ControlPointsCC(param1:Number = 0, param2:Number = 0, param3:Number = 0, param4:Vector.<ClientPointData> = null, param5:DominationResources = null, param6:DominationSounds = null) {
super();
this._keypointTriggerRadius = param1;
this._keypointVisorHeight = param2;
this._minesRestrictionRadius = param3;
this._points = param4;
this._resources = param5;
this._sounds = param6;
}
public function get keypointTriggerRadius() : Number {
return this._keypointTriggerRadius;
}
public function set keypointTriggerRadius(param1:Number) : void {
this._keypointTriggerRadius = param1;
}
public function get keypointVisorHeight() : Number {
return this._keypointVisorHeight;
}
public function set keypointVisorHeight(param1:Number) : void {
this._keypointVisorHeight = param1;
}
public function get minesRestrictionRadius() : Number {
return this._minesRestrictionRadius;
}
public function set minesRestrictionRadius(param1:Number) : void {
this._minesRestrictionRadius = param1;
}
public function get points() : Vector.<ClientPointData> {
return this._points;
}
public function set points(param1:Vector.<ClientPointData>) : void {
this._points = param1;
}
public function get resources() : DominationResources {
return this._resources;
}
public function set resources(param1:DominationResources) : void {
this._resources = param1;
}
public function get sounds() : DominationSounds {
return this._sounds;
}
public function set sounds(param1:DominationSounds) : void {
this._sounds = param1;
}
public function toString() : String {
var local1:String = "ControlPointsCC [";
local1 += "keypointTriggerRadius = " + this.keypointTriggerRadius + " ";
local1 += "keypointVisorHeight = " + this.keypointVisorHeight + " ";
local1 += "minesRestrictionRadius = " + this.minesRestrictionRadius + " ";
local1 += "points = " + this.points + " ";
local1 += "resources = " + this.resources + " ";
local1 += "sounds = " + this.sounds + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.weapon.flamethrower {
import alternativa.engine3d.core.Object3D;
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.tanks.battle.BattleRunnerProvider;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.models.weapon.shared.streamweapon.StreamWeaponEffects;
import alternativa.tanks.models.weapon.streamweapon.StreamWeaponGraphicEffect;
import alternativa.tanks.models.weapon.streamweapon.StreamWeaponSFXData;
import alternativa.tanks.sfx.CollisionObject3DPositionProvider;
import alternativa.tanks.sfx.ISound3DEffect;
import alternativa.tanks.sfx.ISoundEffectDestructionListener;
import alternativa.tanks.sfx.MobileSound3DEffect;
import alternativa.tanks.sfx.MuzzlePositionProvider;
import alternativa.tanks.sfx.OmniStreamLightEffect;
import alternativa.tanks.sfx.Sound3D;
import alternativa.tanks.sfx.StreamWeaponParticlesPositionProvider;
import alternativa.tanks.utils.objectpool.ObjectPool;
public class FlamethrowerEffects extends BattleRunnerProvider implements StreamWeaponEffects, ISoundEffectDestructionListener {
[Inject]
public static var battleService:BattleService;
private static const NUMBER_OF_LOOPS:int = 99999;
private const MUZZLE_SHIFT:Number = 100;
private var objectPool:ObjectPool;
private var range:Number;
private var coneAngle:Number;
private var sfxData:StreamWeaponSFXData;
private var graphicEffect:StreamWeaponGraphicEffect;
private var soundEffect:MobileSound3DEffect;
private var muzzleLightEffect:OmniStreamLightEffect;
private var lightEffect:OmniStreamLightEffect;
private var buffedMode:Boolean;
public function FlamethrowerEffects(param1:ObjectPool, param2:Number, param3:Number, param4:StreamWeaponSFXData) {
super();
this.objectPool = param1;
this.range = param2;
this.coneAngle = param3;
this.sfxData = param4;
this.buffedMode = false;
}
public function startEffects(param1:Body, param2:Vector3, param3:Object3D) : void {
var local4:Sound3D = null;
var local5:MuzzlePositionProvider = null;
var local6:Vector3 = null;
var local7:MuzzlePositionProvider = null;
var local8:CollisionObject3DPositionProvider = null;
var local9:StreamWeaponParticlesPositionProvider = null;
if(this.graphicEffect == null) {
this.graphicEffect = StreamWeaponGraphicEffect(this.objectPool.getObject(StreamWeaponGraphicEffect));
this.graphicEffect.init(param1,this.range,this.coneAngle,FlamethrowerEffectsParams.PARTICLE_SPEED_PER_DISTANCE_METER,param2,param3,this.sfxData,getBattleRunner().getCollisionDetector(),FlamethrowerEffectsParams.PLANE_WIDTH,FlamethrowerEffectsParams.PLANE_LENGTH,FlamethrowerEffectsParams.PARTICLE_START_SIZE,FlamethrowerEffectsParams.PARTICLE_END_SIZE,FlamethrowerEffectsParams.FLAME_MUZZLE_OFFSET,FlamethrowerEffectsParams.FLAME_MUZZLE_RANDOM_OFFSET,this.buffedMode);
battleService.getBattleScene3D().addGraphicEffect(this.graphicEffect);
local4 = Sound3D.create(this.sfxData.shootingSound,FlamethrowerEffectsParams.SOUND_VOLUME);
this.soundEffect = MobileSound3DEffect(this.objectPool.getObject(MobileSound3DEffect));
this.soundEffect.init(local4,param3,0,NUMBER_OF_LOOPS,0,this);
getBattleRunner().getSoundManager().addEffect(this.soundEffect);
this.muzzleLightEffect = OmniStreamLightEffect(this.objectPool.getObject(OmniStreamLightEffect));
local5 = MuzzlePositionProvider(this.objectPool.getObject(MuzzlePositionProvider));
local6 = new Vector3();
local6.copy(param2);
local6.z += this.MUZZLE_SHIFT;
local5.init(param3,param2);
local5.init(param3,param2,0);
local7 = MuzzlePositionProvider(this.objectPool.getObject(MuzzlePositionProvider));
local7.init(param3,local6);
local7.init(param3,local6,0);
this.muzzleLightEffect.init(local7,this.sfxData.startLightAnimation,this.sfxData.loopLightAnimation);
battleService.getBattleScene3D().addGraphicEffect(this.muzzleLightEffect);
this.lightEffect = OmniStreamLightEffect(this.objectPool.getObject(OmniStreamLightEffect));
local8 = CollisionObject3DPositionProvider(this.objectPool.getObject(CollisionObject3DPositionProvider));
local8.init(param3,param2,getBattleRunner().getCollisionDetector(),FlamethrowerEffectsParams.FIRE_LIGHT_OFFSET);
local9 = StreamWeaponParticlesPositionProvider(this.objectPool.getObject(StreamWeaponParticlesPositionProvider));
local9.init(this.graphicEffect,local8);
this.lightEffect.init(local9,this.sfxData.startFireAnimation,this.sfxData.loopFireAnimation);
battleService.getBattleScene3D().addGraphicEffect(this.lightEffect);
}
}
public function stopEffects() : void {
if(this.graphicEffect != null) {
this.graphicEffect.kill();
this.graphicEffect = null;
this.killSound();
this.muzzleLightEffect.stop();
this.muzzleLightEffect = null;
this.lightEffect.stop();
this.lightEffect = null;
}
}
private function killSound() : void {
if(this.soundEffect != null) {
this.soundEffect.kill();
this.soundEffect = null;
}
}
public function onSoundEffectDestroyed(param1:ISound3DEffect) : void {
if(this.soundEffect == param1) {
this.soundEffect = null;
}
}
public function updateRange(param1:Number) : void {
this.range = param1;
if(this.graphicEffect != null) {
this.graphicEffect.updateRange(param1);
}
}
public function setBuffedMode(param1:Boolean) : void {
this.buffedMode = param1;
if(this.graphicEffect != null) {
this.graphicEffect.setBuffedMode(param1);
}
}
}
}
|
package assets.combo {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.combo.combo_UP_RIGHT.png")]
public dynamic class combo_UP_RIGHT extends BitmapData {
public function combo_UP_RIGHT(param1:int = 33, param2:int = 30) {
super(param1,param2);
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.messages {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.messages.ActionOutputLine_rgbPlayerPickBallIcon.png")]
public class ActionOutputLine_rgbPlayerPickBallIcon extends BitmapAsset {
public function ActionOutputLine_rgbPlayerPickBallIcon() {
super();
}
}
}
|
package controls.cellrenderer
{
import flash.display.BitmapData;
import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
public class ButtonState extends Sprite
{
public const l:Shape = new Shape();
public const c:Shape = new Shape();
public const r:Shape = new Shape();
public var bmpLeft:BitmapData;
public var bmpCenter:BitmapData;
public var bmpRight:BitmapData;
public var _width:int;
public function ButtonState()
{
this.bmpLeft = new BitmapData(1,1);
this.bmpCenter = new BitmapData(1,1);
this.bmpRight = new BitmapData(1,1);
super();
addChild(this.l);
addChild(this.c);
addChild(this.r);
}
override public function set width(param1:Number) : void
{
this._width = int(param1);
this.draw();
}
public function draw() : void
{
var _loc1_:Graphics = null;
_loc1_ = this.l.graphics;
_loc1_.clear();
_loc1_.beginBitmapFill(this.bmpLeft);
_loc1_.drawRect(0,0,7,30);
_loc1_.endFill();
this.l.x = 0;
this.l.y = 0;
_loc1_ = this.c.graphics;
_loc1_.clear();
_loc1_.beginBitmapFill(this.bmpCenter);
_loc1_.drawRect(0,0,this._width - 14,30);
_loc1_.endFill();
this.c.x = 7;
this.c.y = 0;
_loc1_ = this.r.graphics;
_loc1_.clear();
_loc1_.beginBitmapFill(this.bmpRight);
_loc1_.drawRect(0,0,7,30);
_loc1_.endFill();
this.r.x = this._width - 7;
this.r.y = 0;
}
}
}
|
package projects.tanks.client.panel.model.quest.daily.type.map {
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 ScoreCollectOnMapDailyQuestModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function ScoreCollectOnMapDailyQuestModelServer(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.utils {
public class EncryptedIntImpl implements EncryptedInt {
private var mask:int;
private var value:int;
public function EncryptedIntImpl(param1:int = 0) {
super();
this.setInt(param1);
}
public function setInt(param1:int) : void {
this.mask = Math.random() * 4294967295;
this.value = param1 ^ this.mask;
}
public function getInt() : int {
return this.value ^ this.mask;
}
}
}
|
package alternativa.engine3d.core {
import alternativa.gfx.agal.VertexShader;
public class DepthRendererLightVertexShader extends VertexShader {
public function DepthRendererLightVertexShader(param1:int) {
super();
if(param1 == 0) {
mov(vt1,cc.rel(va1.x,0));
mov(v1,vt1);
mov(v2,cc.rel(va1.x,1));
mul(vt0,va0,vt1.w);
add(vt0,vt0,vt1);
div(vt0.xy,vt0,vc[3]);
} else {
mov(vt2,cc.rel(va1.y,0));
mov(vt3,cc.rel(va1.y,1));
mov(vt4,cc.rel(va1.y,2));
mov(vt5,cc.rel(va1.y,3));
mov(vt6,cc.rel(va1.y,4));
if(param1 == 1) {
mul(v1.x,vt2.w,vc[3]);
mul(v1.y,vt3.w,vc[3]);
mov(v1.zw,vt4.w);
mul(v2.x,vt2.z,vc[3]);
mul(v2.y,vt3.z,vc[3]);
mov(v2.zw,vt4.z);
mov(v3,vt5);
mov(v4,vt6);
mul(vt0,va0,vt6.w);
mul(vt0.z,va0,vt5.x);
add(vt0.z,vt0,vt5.x);
mul(vt0.z,vt0,vc[3].w);
} else if(param1 == 2) {
mul(vt0.x,vt2.z,vc[3]);
mul(vt0.y,vt3.z,vc[3]);
mov(vt0.zw,vt4.z);
mov(v2,vt0);
mul(vt1.x,vt2.w,vc[3]);
mul(vt1.y,vt3.w,vc[3]);
mov(vt1.zw,vt4.w);
mul(vt0,vt0,vt6.w);
add(v1,vt1,vt0);
mov(v3,vt5);
mov(v4,vt6);
mul(vt0.xy,va0,vt5.x);
mul(vt0.z,va0,vt5);
add(vt0.z,vt0,vt6.w);
}
mov(vt0.w,vc[1]);
dp4(vt1.x,vt0,vt2);
dp4(vt1.y,vt0,vt3);
dp4(vt1.z,vt0,vt4);
mov(vt0.xyz,vt1.xyz);
}
mul(vt0.xy,vt0,vc[1]);
mul(vt1,vc[2],vt0.z);
sub(vt0.xy,vt0,vt1);
mov(v0,vt0);
mov(op.xw,vt0.xz);
neg(op.y,vt0);
mul(vt0.z,vt0,vc[0]);
add(op.z,vt0,vc[0].w);
}
}
}
|
package alternativa.tanks.models.tank.ultimate.titan.generator {
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Mesh;
import alternativa.tanks.engine3d.TextureAnimation;
import alternativa.tanks.engine3d.UVFrame;
import alternativa.tanks.utils.GraphicsUtils;
import alternativa.utils.TextureMaterialRegistry;
import flash.display.BitmapData;
import platform.client.fp10.core.resource.types.MultiframeTextureResource;
import projects.tanks.client.battlefield.models.ultimate.effects.titan.generator.TitanUltimateGeneratorCC;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
public class TitanUltimateResources {
private static const BLUE_SPHERE_ROTATION_ANGLE:Number = Math.PI / 6;
private static const RED_SPHERE_ROTATION_ANGLE:Number = -Math.PI / 6;
private var _sphere:TextureAnimation;
private var _rayMaterial:TextureMaterial;
private var _rayTipMaterial:TextureMaterial;
private var _cellTexture:TextureMaterial;
private var _geosphere:Mesh;
private var _sphereRotationAngle:Number;
public function TitanUltimateResources(param1:TitanUltimateGeneratorCC, param2:TextureMaterialRegistry) {
super();
if(param1.generatorTeam == BattleTeam.BLUE) {
this.fillData(param1.blueSphere,param1.blueRay.data,param1.blueRayTip.data,param1.blueCell.data,param2,BLUE_SPHERE_ROTATION_ANGLE);
} else if(param1.generatorTeam == BattleTeam.RED) {
this.fillData(param1.redSphere,param1.redRay.data,param1.redRayTip.data,param1.redCell.data,param2,RED_SPHERE_ROTATION_ANGLE);
} else {
this.fillData(param1.sphere,param1.ray.data,param1.rayTip.data,param1.cell.data,param2,0);
}
this._geosphere = Mesh(param1.geosphere.objects[0]);
}
private static function createUVFrame(param1:TextureMaterial, param2:MultiframeTextureResource) : Vector.<UVFrame> {
return GraphicsUtils.getUVFramesFromTexture(param1.texture,param2.frameWidth,param2.frameHeight,param2.numFrames);
}
private function fillData(param1:MultiframeTextureResource, param2:BitmapData, param3:BitmapData, param4:BitmapData, param5:TextureMaterialRegistry, param6:Number) : void {
this._rayMaterial = param5.getMaterial(param2);
this._rayMaterial.repeat = true;
this._rayTipMaterial = param5.getMaterial(param3);
var local7:TextureMaterial = param5.getMaterial(param1.data);
var local8:Vector.<UVFrame> = createUVFrame(local7,param1);
this._sphere = new TextureAnimation(local7,local8,param1.fps);
this._cellTexture = param5.getMaterial(param4);
this._sphereRotationAngle = param6;
}
public function get geosphere() : Mesh {
return this._geosphere;
}
public function get sphere() : TextureAnimation {
return this._sphere;
}
public function get rayMaterial() : TextureMaterial {
return this._rayMaterial;
}
public function get rayTipMaterial() : TextureMaterial {
return this._rayTipMaterial;
}
public function get cellTexture() : TextureMaterial {
return this._cellTexture;
}
public function get sphereRotationAngle() : Number {
return this._sphereRotationAngle;
}
}
}
|
package {
import flash.display.Sprite;
import flash.system.Security;
[ExcludeClass]
public class _00c3961a998da121dd1fef7aa674e2095bee87007976935d0dd2e4d0485d6e79_flash_display_Sprite extends Sprite {
public function _00c3961a998da121dd1fef7aa674e2095bee87007976935d0dd2e4d0485d6e79_flash_display_Sprite() {
super();
}
public function allowDomainInRSL(... rest) : void {
Security.allowDomain(rest);
}
public function allowInsecureDomainInRSL(... rest) : void {
Security.allowInsecureDomain(rest);
}
}
}
|
package alternativa.osgi.service.command.impl {
import alternativa.osgi.OSGi;
import alternativa.osgi.bundle.IBundleDescriptor;
import alternativa.osgi.catalogs.ServiceInfo;
import alternativa.osgi.catalogs.ServiceParam;
import alternativa.osgi.service.command.CommandService;
import alternativa.osgi.service.command.FormattedOutput;
public class OSGiCommands {
private var commandService:CommandService;
private var osgi:OSGi;
public function OSGiCommands(param1:OSGi, param2:CommandService) {
super();
this.osgi = param1;
this.commandService = param2;
param2.registerCommand("osgi","ss","Π‘ΠΏΠΈΡΠΎΠΊ ΠΏΠ»Π°Π³ΠΈΠ½ΠΎΠ²",[],this.cmdBundlesList);
param2.registerCommand("osgi","services","Π‘ΠΏΠΈΡΠΎΠΊ ΡΠ΅ΡΠ²ΠΈΡΠΎΠ²",[],this.cmdServicesList);
}
public function cmdBundlesList(param1:FormattedOutput) : void {
var local2:Vector.<IBundleDescriptor> = this.osgi.bundleList;
var local3:int = 0;
while(local3 < local2.length) {
param1.addText(int(local3 + 1).toString() + ". " + local2[local3].name);
local3++;
}
}
public function cmdServicesList(param1:FormattedOutput) : void {
var local4:ServiceInfo = null;
var local2:Vector.<ServiceInfo> = this.osgi.getServicesInfo();
var local3:int = 0;
while(local3 < local2.length) {
local4 = local2[local3];
param1.addText((local3 + 1).toString() + ": " + local4.service + this.getServicesParam(local4.params));
local3++;
}
}
private function getServicesParam(param1:Vector.<ServiceParam>) : String {
var local3:int = 0;
var local4:int = 0;
var local5:ServiceParam = null;
var local2:String = " ";
if(param1 != null) {
local3 = 0;
local4 = int(param1.length);
while(local3 < local4) {
local5 = param1[local3];
local2 += "(" + local5.name + " = " + local5.value + ")";
local3++;
}
}
return local2;
}
}
}
|
package alternativa.tanks.view.mainview {
import platform.client.fp10.core.resource.types.ImageResource;
import projects.tanks.client.battleselect.model.matchmaking.view.MatchmakingLayoutCC;
public class HolidayParams {
private var _holidayTitle:String;
private var _holidayDescription:String;
private var _holidayIcon:ImageResource;
public function HolidayParams(param1:MatchmakingLayoutCC) {
super();
this._holidayTitle = param1.holidayTitle;
this._holidayDescription = param1.holidayDescription;
this._holidayIcon = param1.holidayIcon;
}
public function get holidayTitle() : String {
return this._holidayTitle;
}
public function get holidayDescription() : String {
return this._holidayDescription;
}
public function get holidayIcon() : ImageResource {
return this._holidayIcon;
}
}
}
|
package alternativa.tanks.view.mainview.groupinvite {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.friends.FriendWindowButton;
import alternativa.tanks.gui.friends.FriendsWindowState;
import alternativa.tanks.gui.friends.FriendsWindowStateBigButton;
import alternativa.types.Long;
import controls.TankWindowInner;
import controls.base.LabelBase;
import controls.base.TankInputBase;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.utils.clearTimeout;
import flash.utils.setTimeout;
import forms.ColorConstants;
import forms.TankWindowWithHeader;
import forms.events.LoginFormEvent;
import platform.clients.fp10.libraries.alternativapartners.service.IPartnerService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.alertservices.IAlertService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.clan.ClanUserInfoService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.clan.UserClanInfo;
import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow;
import projects.tanks.clients.fp10.libraries.tanksservices.service.user.IUserInfoService;
public class GroupInviteWindow extends DialogWindow {
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var alertService:IAlertService;
[Inject]
public static var clanUserInfoService:ClanUserInfoService;
[Inject]
public static var userInfoService:IUserInfoService;
[Inject]
public static var partnerService:IPartnerService;
public static const WINDOW_MARGIN:int = 12;
public static const DEFAULT_BUTTON_WIDTH:int = 100;
public static const BUTTON_WITH_ICON_WIDTH:int = 115;
public static const WINDOW_WIDTH:int = 468 + WINDOW_MARGIN * 2 + 4;
private static const WINDOW_HEIGHT:int = 485;
private static const SEARCH_TIMEOUT:int = 600;
private var window:TankWindowWithHeader;
private var windowInner:TankWindowInner;
private var windowSize:Point;
private var acceptedFriendButton:FriendsWindowStateBigButton;
private var clanMembersButton:FriendsWindowStateBigButton;
private var closeButton:FriendWindowButton;
private var searchInListTextInput:TankInputBase;
private var searchInListLabel:LabelBase;
private var searchInListTimeOut:uint;
private var acceptedList:InviteToGroupList;
private var clanList:InviteClanMembersList;
public function GroupInviteWindow() {
super();
this.initWindow();
this.initButtons();
this.initLists();
this.initSearchControl();
this.resize();
addEventListener(Event.ADDED_TO_STAGE,this.added);
}
private function initWindow() : void {
this.window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_FRIENDS);
addChild(this.window);
this.windowSize = new Point(WINDOW_WIDTH,WINDOW_HEIGHT);
this.windowInner = new TankWindowInner(0,0,TankWindowInner.GREEN);
addChild(this.windowInner);
}
public function setAllowedUsers(param1:Vector.<Long>, param2:Vector.<Long>) : void {
this.acceptedList.fillList(param1);
this.clanList.fillList(param2);
}
private function initButtons() : void {
this.acceptedFriendButton = new FriendsWindowStateBigButton(FriendsWindowState.ACCEPTED);
this.acceptedFriendButton.text = localeService.getText(TanksLocale.TEXT_FRIENDS);
this.acceptedFriendButton.addEventListener(MouseEvent.CLICK,this.onShowFriends);
addChild(this.acceptedFriendButton);
this.clanMembersButton = new FriendsWindowStateBigButton(FriendsWindowState.CLAN_MEMBERS);
this.clanMembersButton.text = localeService.getText(TanksLocale.TEXT_CLAN_MY_CLAN);
this.clanMembersButton.addEventListener(MouseEvent.CLICK,this.onShowClanMembers);
addChild(this.clanMembersButton);
this.closeButton = new FriendWindowButton();
this.closeButton.label = localeService.getText(TanksLocale.TEXT_FRIENDS_CLOSE);
this.closeButton.addEventListener(MouseEvent.CLICK,this.onCloseButtonClick);
addChild(this.closeButton);
}
public function removeUser(param1:Long) : void {
this.acceptedList.removeUser(param1);
this.clanList.removeUser(param1);
}
private function onShowFriends(param1:MouseEvent) : void {
this.show(FriendsWindowState.ACCEPTED);
}
private function onShowClanMembers(param1:MouseEvent) : void {
this.show(FriendsWindowState.CLAN_MEMBERS);
}
private function initLists() : void {
this.acceptedList = new InviteToGroupList();
this.clanList = new InviteClanMembersList();
}
private function initSearchControl() : void {
this.searchInListTextInput = new TankInputBase();
this.searchInListTextInput.maxChars = 20;
this.searchInListTextInput.restrict = "0-9.a-zA-z_\\-*";
this.searchInListTextInput.addEventListener(FocusEvent.FOCUS_IN,this.onFocusInSearchInList);
this.searchInListTextInput.addEventListener(FocusEvent.FOCUS_OUT,this.onFocusOutSearchInList);
this.searchInListTextInput.addEventListener(LoginFormEvent.TEXT_CHANGED,this.onTextChangeSearchInList);
addChild(this.searchInListTextInput);
this.searchInListLabel = new LabelBase();
this.searchInListLabel.mouseEnabled = false;
this.searchInListLabel.color = ColorConstants.LIST_LABEL_HINT;
this.searchInListLabel.text = localeService.getText(TanksLocale.TEXT_FRIENDS_FIND_IN_LIST_HINT);
addChild(this.searchInListLabel);
}
private function added(param1:Event) : void {
var local2:UserClanInfo = clanUserInfoService.userClanInfoByUserId(userInfoService.getCurrentUserId());
this.clanMembersButton.visible = local2 != null && local2.isInClan;
this.closeButton.addEventListener(MouseEvent.CLICK,this.onCloseButtonClick);
this.show(FriendsWindowState.ACCEPTED);
}
private function onTextChangeSearchInList(param1:LoginFormEvent) : void {
if(this.searchInListTextInput.value.length > 0) {
this.searchInListLabel.visible = false;
}
clearTimeout(this.searchInListTimeOut);
this.searchInListTimeOut = setTimeout(this.acceptedList.filter,SEARCH_TIMEOUT,"uid",this.searchInListTextInput.value);
this.updateVisibleSearchInListLabel();
}
private function onFocusInSearchInList(param1:FocusEvent) : void {
this.searchInListLabel.visible = false;
}
private function onFocusOutSearchInList(param1:FocusEvent) : void {
this.updateVisibleSearchInListLabel();
}
private function updateVisibleSearchInListLabel() : void {
if(this.searchInListTextInput.value.length == 0 && display.stage.focus != this.searchInListTextInput.textField) {
this.searchInListLabel.visible = true;
}
}
private function resize() : void {
this.window.width = this.windowSize.x;
this.window.height = this.windowSize.y;
this.acceptedFriendButton.x = WINDOW_MARGIN;
this.acceptedFriendButton.width = BUTTON_WITH_ICON_WIDTH;
this.acceptedFriendButton.y = WINDOW_MARGIN;
this.clanMembersButton.x = this.acceptedFriendButton.x + BUTTON_WITH_ICON_WIDTH + WINDOW_MARGIN;
this.clanMembersButton.width = BUTTON_WITH_ICON_WIDTH;
this.clanMembersButton.y = WINDOW_MARGIN;
this.closeButton.width = DEFAULT_BUTTON_WIDTH;
this.closeButton.x = this.windowSize.x - this.closeButton.width - WINDOW_MARGIN;
this.closeButton.y = this.windowSize.y - this.closeButton.height - WINDOW_MARGIN;
this.windowInner.x = WINDOW_MARGIN;
this.windowInner.y = this.acceptedFriendButton.y + this.acceptedFriendButton.height + 1;
this.windowInner.width = this.windowSize.x - WINDOW_MARGIN * 2;
this.windowInner.height = this.windowSize.y - this.windowInner.y - this.closeButton.height - 18;
var local1:int = 4;
var local2:int = this.windowInner.x + local1;
var local3:int = this.windowInner.y + local1;
var local4:int = this.windowInner.width - local1 * 2;
var local5:int = this.windowInner.height - local1 * 2;
this.acceptedList.resize(local4,local5);
this.acceptedList.x = local2;
this.acceptedList.y = local3;
this.clanList.resize(local4,local5);
this.clanList.x = local2;
this.clanList.y = local3;
this.searchInListTextInput.width = 235;
this.searchInListTextInput.x = WINDOW_MARGIN;
this.searchInListTextInput.y = this.windowSize.y - this.searchInListTextInput.height - WINDOW_MARGIN;
this.searchInListLabel.x = this.searchInListTextInput.x + 3;
this.searchInListLabel.y = this.searchInListTextInput.y + 7;
}
public function destroy() : void {
this.acceptedFriendButton.removeEventListener(MouseEvent.CLICK,this.onShowFriends);
this.clanMembersButton.removeEventListener(MouseEvent.CLICK,this.onShowClanMembers);
this.searchInListTextInput.removeEventListener(FocusEvent.FOCUS_IN,this.onFocusInSearchInList);
this.searchInListTextInput.removeEventListener(FocusEvent.FOCUS_OUT,this.onFocusOutSearchInList);
this.hide();
}
private function hide() : void {
dialogService.removeDialog(this);
this.acceptedList.hide();
this.clanList.hide();
clearTimeout(this.searchInListTimeOut);
}
public function show(param1:FriendsWindowState) : void {
switch(param1) {
case FriendsWindowState.ACCEPTED:
this.acceptedFriendButton.enable = false;
this.clanMembersButton.enable = true;
this.windowInner.addChild(this.acceptedList);
this.searchInListTextInput.value = "";
this.searchInListTextInput.visible = true;
this.searchInListLabel.visible = true;
this.acceptedList.init();
this.clanList.hide();
addChild(this.acceptedList);
break;
case FriendsWindowState.CLAN_MEMBERS:
this.acceptedFriendButton.enable = true;
this.clanMembersButton.enable = false;
this.windowInner.addChild(this.clanList);
this.searchInListTextInput.visible = false;
this.searchInListLabel.visible = false;
this.clanList.init();
this.acceptedList.hide();
addChild(this.clanList);
}
dialogService.addDialog(this);
}
private function onCloseButtonClick(param1:MouseEvent = null) : void {
this.closeWindow();
}
private function closeWindow() : void {
this.searchInListTextInput.value = "";
this.updateVisibleSearchInListLabel();
display.stage.focus = null;
this.hide();
}
override protected function cancelKeyPressed() : void {
this.onCloseButtonClick();
}
}
}
|
package projects.tanks.client.tanksservices.model.rankloader {
public class RankLoaderCC {
private var _ranks:Vector.<RankInfo>;
public function RankLoaderCC(param1:Vector.<RankInfo> = null) {
super();
this._ranks = param1;
}
public function get ranks() : Vector.<RankInfo> {
return this._ranks;
}
public function set ranks(param1:Vector.<RankInfo>) : void {
this._ranks = param1;
}
public function toString() : String {
var local1:String = "RankLoaderCC [";
local1 += "ranks = " + this.ranks + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.battle.battlefield.keyboard {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_hammershellsIconClass.png")]
public class DeviceIcons_hammershellsIconClass extends BitmapAsset {
public function DeviceIcons_hammershellsIconClass() {
super();
}
}
}
|
package alternativa.tanks.view.icons {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.icons.BattleParamsBattleInfoIcons_autoBalanceClass.png")]
public class BattleParamsBattleInfoIcons_autoBalanceClass extends BitmapAsset {
public function BattleParamsBattleInfoIcons_autoBalanceClass() {
super();
}
}
}
|
package alternativa.tanks.utils {
public interface DataUnitValidator {
function hasIncorrectData() : Boolean;
function getType() : int;
}
}
|
package alternativa.tanks.model.challenge
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ChallengeCongratulationWindow_healthBitmap extends BitmapAsset
{
public function ChallengeCongratulationWindow_healthBitmap()
{
super();
}
}
}
|
package alternativa.tanks.models.battlefield
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ViewportBorder_bmpClassCorner3 extends BitmapAsset
{
public function ViewportBorder_bmpClassCorner3()
{
super();
}
}
}
|
package forms.battlelist
{
import assets.Diamond;
import controls.BigButton;
import controls.Label;
import flash.events.MouseEvent;
public class BattleBigButton extends BigButton
{
private var diamond:Diamond;
private var costLabel:Label;
private var _cost:int = 0;
public function BattleBigButton()
{
this.diamond = new Diamond();
this.costLabel = new Label();
super();
addChild(this.diamond);
addChild(this.costLabel);
this.costLabel.visible = false;
this.diamond.visible = false;
label = "";
}
override public function set width(w:Number) : void
{
_width = int(w);
stateDOWN.width = stateOFF.width = stateOVER.width = stateUP.width = _width;
_info.width = _label.width = _width - 4;
if(_icon.bitmapData != null)
{
_icon.x = 6;
_icon.y = int(25 - _icon.height / 2);
_label.width = _width - 8 - _icon.width;
_label.x = _icon.width + 4;
_label.y = this._cost == 0 ? Number(16) : Number(6);
}
if(this._cost > 0)
{
this.diamond.visible = this.costLabel.visible = true;
this.diamond.x = _icon.width + 4 + (_label.width - _label.textWidth) / 2;
this.diamond.y = 26;
this.costLabel.y = 22;
this.costLabel.text = String(this._cost);
this.costLabel.x = this.diamond.x + this.diamond.width;
}
else
{
this.diamond.visible = this.costLabel.visible = false;
}
}
public function set cost(value:int) : void
{
this._cost = value;
this.width = _width;
}
override protected function onMouseEvent(event:MouseEvent) : void
{
if(_enable)
{
switch(event.type)
{
case MouseEvent.MOUSE_OVER:
setState(2);
_label.y = this._cost == 0 ? Number(16) : Number(6);
this.diamond.y = 26;
this.costLabel.y = 22;
break;
case MouseEvent.MOUSE_OUT:
setState(1);
_label.y = this._cost == 0 ? Number(16) : Number(6);
this.diamond.y = 26;
this.costLabel.y = 22;
break;
case MouseEvent.MOUSE_DOWN:
setState(3);
_label.y = this._cost == 0 ? Number(17) : Number(7);
this.diamond.y = 26;
this.costLabel.y = 23;
break;
case MouseEvent.MOUSE_UP:
setState(1);
_label.y = this._cost == 0 ? Number(16) : Number(6);
this.diamond.y = 26;
this.costLabel.y = 22;
}
if(_icon != null)
{
_icon.y = int(25 - _icon.height / 2) + (event.type == MouseEvent.MOUSE_DOWN ? 1 : 0);
}
}
}
}
}
|
package com.lorentz.SVG.data.gradients
{
import com.lorentz.SVG.utils.ICloneable;
import flash.geom.Matrix;
import flash.utils.getDefinitionByName;
import flash.utils.getQualifiedClassName;
public class SVGGradient implements ICloneable
{
public function SVGGradient(type:String){
_type = type;
}
private var _type:String;
public function get type():String {
return _type;
}
public var gradientUnits:String;
public var transform:Matrix;
public var spreadMethod:String;
public var colors:Array;
public var alphas:Array;
public var ratios:Array;
public function clone():Object {
var clazz:Class = getDefinitionByName(getQualifiedClassName(this)) as Class;
var copy:SVGGradient = new clazz();
copyTo(copy);
return copy;
}
public function copyTo(target:SVGGradient):void {
target.gradientUnits = gradientUnits;
target.transform = transform == null ? null : transform.clone();
target.spreadMethod = spreadMethod;
target.colors = colors == null ? null : colors.slice();
target.alphas = alphas == null ? null : alphas.slice();
target.ratios = ratios == null ? null : ratios.slice();
}
}
} |
package alternativa.tanks.gui.clanmanagement {
import base.DiscreteSprite;
import controls.base.LabelBase;
import flash.display.Bitmap;
import flash.display.Shape;
import flash.display.StageQuality;
import flash.events.Event;
import flash.text.TextFormatAlign;
public class ClanBonusItem extends DiscreteSprite {
private static const WIDTH:Number = 120;
private static const HEIGHT:Number = 100;
private var image:Bitmap;
private var textLabel:LabelBase;
private var valueLabel:LabelBase;
private var stageQuality:String;
public function ClanBonusItem(param1:Bitmap, param2:String, param3:String) {
super();
this.image = param1;
this.textLabel = new LabelBase();
this.textLabel.align = TextFormatAlign.CENTER;
this.textLabel.wordWrap = true;
this.textLabel.multiline = true;
this.valueLabel = new LabelBase();
this.valueLabel.size = 16;
this.valueLabel.bold = true;
this.image.x = WIDTH - this.image.bitmapData.width >> 1;
this.image.y = HEIGHT - this.image.bitmapData.height >> 1;
this.textLabel.text = param2;
this.textLabel.width = WIDTH;
this.textLabel.y = 5;
this.setValue(param3);
var local4:Shape = new Shape();
local4.graphics.beginFill(676609,1);
local4.graphics.lineStyle(0,5177127,1);
local4.graphics.drawRoundRect(0,0,WIDTH,HEIGHT,6,6);
local4.graphics.endFill();
addChild(local4);
addChild(this.image);
addChild(this.textLabel);
addChild(this.valueLabel);
addEventListener(Event.ADDED_TO_STAGE,this.addedToStage);
}
private function addedToStage(param1:Event) : void {
removeEventListener(Event.ADDED_TO_STAGE,this.addedToStage);
this.stageQuality = stage.quality;
stage.quality = StageQuality.MEDIUM;
addEventListener(Event.REMOVED_FROM_STAGE,this.removedFromStage);
}
private function removedFromStage(param1:Event) : void {
removeEventListener(Event.REMOVED_FROM_STAGE,this.removedFromStage);
stage.quality = this.stageQuality;
}
public function setValue(param1:String) : void {
this.valueLabel.text = param1;
this.valueLabel.x = WIDTH - this.valueLabel.width >> 1;
this.valueLabel.y = HEIGHT - 5 - this.valueLabel.height;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.armor.chassis.tracked {
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.armor.chassis.tracked.TrackedChassisCC;
public class VectorCodecTrackedChassisCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecTrackedChassisCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(TrackedChassisCC,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.<TrackedChassisCC> = new Vector.<TrackedChassisCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = TrackedChassisCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:TrackedChassisCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<TrackedChassisCC> = Vector.<TrackedChassisCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.model.quest.challenge {
import flash.events.Event;
public class ChallengeEvents extends Event {
public static const REQUEST_DATA:String = "ChallengeEvents.REQUEST_DATA";
public function ChallengeEvents(param1:String) {
super(param1,true);
}
}
}
|
package com.lorentz.SVG.events
{
import flash.events.Event;
public class StyleDeclarationEvent extends Event
{
public static const PROPERTY_CHANGE:String = "propertyChange";
private var _propertyName:String;
private var _oldValue:String;
private var _newValue:String;
public function StyleDeclarationEvent(type:String, propertyName:String, oldValue:String, newValue:String)
{
super(type);
_propertyName = propertyName;
_oldValue = oldValue;
_newValue = newValue;
}
public function get propertyName():String {
return _propertyName;
}
public function get oldValue():String {
return _oldValue;
}
public function get newValue():String {
return _newValue;
}
}
} |
package alternativa.tanks.battle.events.reload {
public class ReloadActivateEvent {
public function ReloadActivateEvent() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.battle.battlefield.facilities.facillity {
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 FacilitySphericalZoneModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function FacilitySphericalZoneModelServer(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 controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangIconNormal_p18 extends BitmapAsset
{
public function RangIconNormal_p18()
{
super();
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.cp.resources {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import platform.client.fp10.core.resource.types.ImageResource;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.client.battlefield.models.battle.cp.resources.DominationResources;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class CodecDominationResources implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_bigLetters:ICodec;
private var codec_blueCircle:ICodec;
private var codec_bluePedestalTexture:ICodec;
private var codec_blueRay:ICodec;
private var codec_blueRayTip:ICodec;
private var codec_neutralCircle:ICodec;
private var codec_neutralPedestalTexture:ICodec;
private var codec_pedestal:ICodec;
private var codec_redCircle:ICodec;
private var codec_redPedestalTexture:ICodec;
private var codec_redRay:ICodec;
private var codec_redRayTip:ICodec;
public function CodecDominationResources() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_bigLetters = param1.getCodec(new TypeCodecInfo(ImageResource,false));
this.codec_blueCircle = param1.getCodec(new TypeCodecInfo(ImageResource,false));
this.codec_bluePedestalTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_blueRay = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_blueRayTip = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_neutralCircle = param1.getCodec(new TypeCodecInfo(ImageResource,false));
this.codec_neutralPedestalTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_pedestal = param1.getCodec(new TypeCodecInfo(Tanks3DSResource,false));
this.codec_redCircle = param1.getCodec(new TypeCodecInfo(ImageResource,false));
this.codec_redPedestalTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_redRay = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_redRayTip = param1.getCodec(new TypeCodecInfo(TextureResource,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:DominationResources = new DominationResources();
local2.bigLetters = this.codec_bigLetters.decode(param1) as ImageResource;
local2.blueCircle = this.codec_blueCircle.decode(param1) as ImageResource;
local2.bluePedestalTexture = this.codec_bluePedestalTexture.decode(param1) as TextureResource;
local2.blueRay = this.codec_blueRay.decode(param1) as TextureResource;
local2.blueRayTip = this.codec_blueRayTip.decode(param1) as TextureResource;
local2.neutralCircle = this.codec_neutralCircle.decode(param1) as ImageResource;
local2.neutralPedestalTexture = this.codec_neutralPedestalTexture.decode(param1) as TextureResource;
local2.pedestal = this.codec_pedestal.decode(param1) as Tanks3DSResource;
local2.redCircle = this.codec_redCircle.decode(param1) as ImageResource;
local2.redPedestalTexture = this.codec_redPedestalTexture.decode(param1) as TextureResource;
local2.redRay = this.codec_redRay.decode(param1) as TextureResource;
local2.redRayTip = this.codec_redRayTip.decode(param1) as TextureResource;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:DominationResources = DominationResources(param2);
this.codec_bigLetters.encode(param1,local3.bigLetters);
this.codec_blueCircle.encode(param1,local3.blueCircle);
this.codec_bluePedestalTexture.encode(param1,local3.bluePedestalTexture);
this.codec_blueRay.encode(param1,local3.blueRay);
this.codec_blueRayTip.encode(param1,local3.blueRayTip);
this.codec_neutralCircle.encode(param1,local3.neutralCircle);
this.codec_neutralPedestalTexture.encode(param1,local3.neutralPedestalTexture);
this.codec_pedestal.encode(param1,local3.pedestal);
this.codec_redCircle.encode(param1,local3.redCircle);
this.codec_redPedestalTexture.encode(param1,local3.redPedestalTexture);
this.codec_redRay.encode(param1,local3.redRay);
this.codec_redRayTip.encode(param1,local3.redRayTip);
}
}
}
|
package alternativa.engine3d.containers
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.core.Debug;
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.core.Object3DContainer;
import alternativa.engine3d.core.VG;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.core.Wrapper;
use namespace alternativa3d;
public class ConflictContainer extends Object3DContainer
{
public var resolveByAABB:Boolean = true;
public var resolveByOOBB:Boolean = true;
public var threshold:Number = 0.01;
public function ConflictContainer()
{
super();
}
override public function clone() : Object3D
{
var _loc1_:ConflictContainer = new ConflictContainer();
_loc1_.clonePropertiesFrom(this);
return _loc1_;
}
override protected function clonePropertiesFrom(param1:Object3D) : void
{
super.clonePropertiesFrom(param1);
var _loc2_:ConflictContainer = param1 as ConflictContainer;
this.resolveByAABB = _loc2_.resolveByAABB;
this.resolveByOOBB = _loc2_.resolveByOOBB;
this.threshold = _loc2_.threshold;
}
override alternativa3d function draw(param1:Camera3D) : void
{
var _loc2_:int = 0;
var _loc4_:VG = null;
var _loc3_:VG = getVG(param1);
if(_loc3_ != null)
{
if(param1.debug && (_loc2_ = param1.checkInDebug(this)) > 0)
{
if(_loc2_ & Debug.BOUNDS)
{
Debug.drawBounds(param1,this,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ);
}
}
if(_loc3_.next != null)
{
calculateInverseMatrix();
if(this.resolveByAABB)
{
_loc4_ = _loc3_;
while(_loc4_ != null)
{
_loc4_.calculateAABB(ima,imb,imc,imd,ime,imf,img,imh,imi,imj,imk,iml);
_loc4_ = _loc4_.next;
}
this.drawAABBGeometry(param1,_loc3_);
}
else if(this.resolveByOOBB)
{
_loc4_ = _loc3_;
while(_loc4_ != null)
{
_loc4_.calculateOOBB(this);
_loc4_ = _loc4_.next;
}
this.drawOOBBGeometry(param1,_loc3_);
}
else
{
this.drawConflictGeometry(param1,_loc3_);
}
}
else
{
_loc3_.draw(param1,this.threshold,this);
_loc3_.destroy();
}
}
}
alternativa3d function drawAABBGeometry(param1:Camera3D, param2:VG, param3:Boolean = true, param4:Boolean = false, param5:Boolean = true, param6:int = -1) : void
{
var _loc7_:Boolean = false;
var _loc8_:Boolean = false;
var _loc9_:Boolean = false;
var _loc14_:Boolean = false;
var _loc10_:VG = !!param5 ? this.sortGeometry(param2,param3,param4) : param2;
var _loc11_:VG = _loc10_;
var _loc12_:VG = _loc10_.next;
var _loc13_:Number = _loc10_.boundMax;
while(_loc12_ != null)
{
_loc14_ = _loc12_.boundMin >= _loc13_ - this.threshold;
if(_loc14_ || _loc12_.next == null)
{
if(_loc14_)
{
_loc11_.next = null;
param6 = 0;
}
else
{
_loc12_ = null;
param6++;
}
if(param3)
{
_loc7_ = imd < _loc13_;
_loc8_ = false;
_loc9_ = true;
}
else if(param4)
{
_loc7_ = imh < _loc13_;
_loc8_ = false;
_loc9_ = false;
}
else
{
_loc7_ = iml < _loc13_;
_loc8_ = true;
_loc9_ = false;
}
if(_loc7_)
{
if(_loc10_.next != null)
{
if(param6 < 2)
{
this.drawAABBGeometry(param1,_loc10_,_loc8_,_loc9_,true,param6);
}
else if(this.resolveByOOBB)
{
_loc11_ = _loc10_;
while(_loc11_ != null)
{
_loc11_.calculateOOBB(this);
_loc11_ = _loc11_.next;
}
this.drawOOBBGeometry(param1,_loc10_);
}
else
{
this.drawConflictGeometry(param1,_loc10_);
}
}
else
{
_loc10_.draw(param1,this.threshold,this);
_loc10_.destroy();
}
if(_loc12_ != null)
{
if(_loc12_.next != null)
{
this.drawAABBGeometry(param1,_loc12_,param3,param4,false,-1);
}
else
{
_loc12_.draw(param1,this.threshold,this);
_loc12_.destroy();
}
}
}
else
{
if(_loc12_ != null)
{
if(_loc12_.next != null)
{
this.drawAABBGeometry(param1,_loc12_,param3,param4,false,-1);
}
else
{
_loc12_.draw(param1,this.threshold,this);
_loc12_.destroy();
}
}
if(_loc10_.next != null)
{
if(param6 < 2)
{
this.drawAABBGeometry(param1,_loc10_,_loc8_,_loc9_,true,param6);
}
else if(this.resolveByOOBB)
{
_loc11_ = _loc10_;
while(_loc11_ != null)
{
_loc11_.calculateOOBB(this);
_loc11_ = _loc11_.next;
}
this.drawOOBBGeometry(param1,_loc10_);
}
else
{
this.drawConflictGeometry(param1,_loc10_);
}
}
else
{
_loc10_.draw(param1,this.threshold,this);
_loc10_.destroy();
}
}
break;
}
if(_loc12_.boundMax > _loc13_)
{
_loc13_ = _loc12_.boundMax;
}
_loc11_ = _loc12_;
_loc12_ = _loc12_.next;
}
}
private function sortGeometry(param1:VG, param2:Boolean, param3:Boolean) : VG
{
var _loc4_:VG = param1;
var _loc5_:VG = param1.next;
while(_loc5_ != null && _loc5_.next != null)
{
param1 = param1.next;
_loc5_ = _loc5_.next.next;
}
_loc5_ = param1.next;
param1.next = null;
if(_loc4_.next != null)
{
_loc4_ = this.sortGeometry(_loc4_,param2,param3);
}
else if(param2)
{
_loc4_.boundMin = _loc4_.boundMinX;
_loc4_.boundMax = _loc4_.boundMaxX;
}
else if(param3)
{
_loc4_.boundMin = _loc4_.boundMinY;
_loc4_.boundMax = _loc4_.boundMaxY;
}
else
{
_loc4_.boundMin = _loc4_.boundMinZ;
_loc4_.boundMax = _loc4_.boundMaxZ;
}
if(_loc5_.next != null)
{
_loc5_ = this.sortGeometry(_loc5_,param2,param3);
}
else if(param2)
{
_loc5_.boundMin = _loc5_.boundMinX;
_loc5_.boundMax = _loc5_.boundMaxX;
}
else if(param3)
{
_loc5_.boundMin = _loc5_.boundMinY;
_loc5_.boundMax = _loc5_.boundMaxY;
}
else
{
_loc5_.boundMin = _loc5_.boundMinZ;
_loc5_.boundMax = _loc5_.boundMaxZ;
}
var _loc6_:Boolean = _loc4_.boundMin < _loc5_.boundMin;
if(_loc6_)
{
param1 = _loc4_;
_loc4_ = _loc4_.next;
}
else
{
param1 = _loc5_;
_loc5_ = _loc5_.next;
}
var _loc7_:VG = param1;
while(_loc4_ != null)
{
if(_loc5_ == null)
{
_loc7_.next = _loc4_;
return param1;
}
if(_loc6_)
{
if(_loc4_.boundMin < _loc5_.boundMin)
{
_loc7_ = _loc4_;
_loc4_ = _loc4_.next;
}
else
{
_loc7_.next = _loc5_;
_loc7_ = _loc5_;
_loc5_ = _loc5_.next;
_loc6_ = false;
}
}
else if(_loc5_.boundMin < _loc4_.boundMin)
{
_loc7_ = _loc5_;
_loc5_ = _loc5_.next;
}
else
{
_loc7_.next = _loc4_;
_loc7_ = _loc4_;
_loc4_ = _loc4_.next;
_loc6_ = true;
}
}
_loc7_.next = _loc5_;
return param1;
}
alternativa3d function drawOOBBGeometry(param1:Camera3D, param2:VG) : void
{
var _loc17_:VG = null;
var _loc3_:Vertex = null;
var _loc4_:Vertex = null;
var _loc5_:Wrapper = null;
var _loc6_:Number = NaN;
var _loc7_:Number = NaN;
var _loc8_:Number = NaN;
var _loc9_:Number = NaN;
var _loc10_:Number = NaN;
var _loc11_:Boolean = false;
var _loc12_:Boolean = false;
var _loc13_:VG = null;
var _loc14_:VG = null;
var _loc15_:Boolean = false;
var _loc16_:VG = null;
_loc17_ = null;
var _loc18_:VG = null;
var _loc19_:VG = null;
_loc13_ = param2;
while(_loc13_ != null)
{
if(_loc13_.viewAligned)
{
_loc10_ = _loc13_.object.ml;
_loc14_ = param2;
while(_loc14_ != null)
{
if(!_loc14_.viewAligned)
{
_loc11_ = false;
_loc12_ = false;
_loc3_ = _loc14_.boundVertexList;
while(_loc3_ != null)
{
if(_loc3_.cameraZ > _loc10_)
{
if(_loc11_)
{
break;
}
_loc12_ = true;
}
else
{
if(_loc12_)
{
break;
}
_loc11_ = true;
}
_loc3_ = _loc3_.next;
}
if(_loc3_ != null)
{
break;
}
}
_loc14_ = _loc14_.next;
}
if(_loc14_ == null)
{
break;
}
}
else
{
_loc4_ = _loc13_.boundPlaneList;
while(_loc4_ != null)
{
_loc7_ = _loc4_.cameraX;
_loc8_ = _loc4_.cameraY;
_loc9_ = _loc4_.cameraZ;
_loc10_ = _loc4_.offset;
_loc15_ = false;
_loc14_ = param2;
while(_loc14_ != null)
{
if(_loc13_ != _loc14_)
{
_loc11_ = false;
_loc12_ = false;
if(_loc14_.viewAligned)
{
_loc5_ = _loc14_.faceStruct.wrapper;
while(_loc5_ != null)
{
_loc3_ = _loc5_.vertex;
if(_loc3_.cameraX * _loc7_ + _loc3_.cameraY * _loc8_ + _loc3_.cameraZ * _loc9_ >= _loc10_ - this.threshold)
{
if(_loc11_)
{
break;
}
_loc15_ = true;
_loc12_ = true;
}
else
{
if(_loc12_)
{
break;
}
_loc11_ = true;
}
_loc5_ = _loc5_.next;
}
if(_loc5_ != null)
{
break;
}
}
else
{
_loc3_ = _loc14_.boundVertexList;
while(_loc3_ != null)
{
if(_loc3_.cameraX * _loc7_ + _loc3_.cameraY * _loc8_ + _loc3_.cameraZ * _loc9_ >= _loc10_ - this.threshold)
{
if(_loc11_)
{
break;
}
_loc15_ = true;
_loc12_ = true;
}
else
{
if(_loc12_)
{
break;
}
_loc11_ = true;
}
_loc3_ = _loc3_.next;
}
if(_loc3_ != null)
{
break;
}
}
}
_loc14_ = _loc14_.next;
}
if(_loc14_ == null && _loc15_)
{
break;
}
_loc4_ = _loc4_.next;
}
if(_loc4_ != null)
{
break;
}
}
_loc13_ = _loc13_.next;
}
if(_loc13_ != null)
{
if(_loc13_.viewAligned)
{
while(param2 != null)
{
_loc16_ = param2.next;
if(param2.viewAligned)
{
_loc6_ = param2.object.ml - _loc10_;
if(_loc6_ < -this.threshold)
{
param2.next = _loc19_;
_loc19_ = param2;
}
else if(_loc6_ > this.threshold)
{
param2.next = _loc17_;
_loc17_ = param2;
}
else
{
param2.next = _loc18_;
_loc18_ = param2;
}
}
else
{
_loc3_ = param2.boundVertexList;
while(_loc3_ != null)
{
_loc6_ = _loc3_.cameraZ - _loc10_;
if(_loc6_ < -this.threshold)
{
param2.next = _loc19_;
_loc19_ = param2;
break;
}
if(_loc6_ > this.threshold)
{
param2.next = _loc17_;
_loc17_ = param2;
break;
}
_loc3_ = _loc3_.next;
}
if(_loc3_ == null)
{
param2.next = _loc18_;
_loc18_ = param2;
}
}
var param2:VG = _loc16_;
}
}
else
{
while(param2 != null)
{
_loc16_ = param2.next;
if(param2.viewAligned)
{
_loc5_ = param2.faceStruct.wrapper;
while(_loc5_ != null)
{
_loc3_ = _loc5_.vertex;
_loc6_ = _loc3_.cameraX * _loc7_ + _loc3_.cameraY * _loc8_ + _loc3_.cameraZ * _loc9_ - _loc10_;
if(_loc6_ < -this.threshold)
{
param2.next = _loc17_;
_loc17_ = param2;
break;
}
if(_loc6_ > this.threshold)
{
param2.next = _loc19_;
_loc19_ = param2;
break;
}
_loc5_ = _loc5_.next;
}
if(_loc5_ == null)
{
param2.next = _loc18_;
_loc18_ = param2;
}
}
else
{
_loc3_ = param2.boundVertexList;
while(_loc3_ != null)
{
_loc6_ = _loc3_.cameraX * _loc7_ + _loc3_.cameraY * _loc8_ + _loc3_.cameraZ * _loc9_ - _loc10_;
if(_loc6_ < -this.threshold)
{
param2.next = _loc17_;
_loc17_ = param2;
break;
}
if(_loc6_ > this.threshold)
{
param2.next = _loc19_;
_loc19_ = param2;
break;
}
_loc3_ = _loc3_.next;
}
if(_loc3_ == null)
{
param2.next = _loc18_;
_loc18_ = param2;
}
}
param2 = _loc16_;
}
}
if(_loc13_.viewAligned || _loc10_ < 0)
{
if(_loc19_ != null)
{
if(_loc19_.next != null)
{
this.drawOOBBGeometry(param1,_loc19_);
}
else
{
_loc19_.draw(param1,this.threshold,this);
_loc19_.destroy();
}
}
while(_loc18_ != null)
{
_loc16_ = _loc18_.next;
_loc18_.draw(param1,this.threshold,this);
_loc18_.destroy();
_loc18_ = _loc16_;
}
if(_loc17_ != null)
{
if(_loc17_.next != null)
{
this.drawOOBBGeometry(param1,_loc17_);
}
else
{
_loc17_.draw(param1,this.threshold,this);
_loc17_.destroy();
}
}
}
else
{
if(_loc17_ != null)
{
if(_loc17_.next != null)
{
try
{
this.drawOOBBGeometry(param1,_loc17_);
}
catch(e:Error)
{
_loc17_.draw(param1,this.threshold,this);
_loc17_.destroy();
}
}
else
{
_loc17_.draw(param1,this.threshold,this);
_loc17_.destroy();
}
}
while(_loc18_ != null)
{
_loc16_ = _loc18_.next;
_loc18_.draw(param1,this.threshold,this);
_loc18_.destroy();
_loc18_ = _loc16_;
}
if(_loc19_ != null)
{
if(_loc19_.next != null)
{
this.drawOOBBGeometry(param1,_loc19_);
}
else
{
_loc19_.draw(param1,this.threshold,this);
_loc19_.destroy();
}
}
}
}
else
{
this.drawConflictGeometry(param1,param2);
}
}
alternativa3d function drawConflictGeometry(param1:Camera3D, param2:VG) : void
{
var _loc3_:Face = null;
var _loc4_:Face = null;
var _loc5_:VG = null;
var _loc6_:VG = null;
var _loc7_:VG = null;
var _loc8_:Face = null;
var _loc9_:Face = null;
var _loc10_:Face = null;
var _loc11_:Face = null;
var _loc12_:Face = null;
var _loc13_:Face = null;
var _loc14_:Face = null;
var _loc15_:Face = null;
var _loc16_:Face = null;
var _loc17_:Boolean = false;
while(param2 != null)
{
_loc5_ = param2.next;
if(param2.space == 1)
{
param2.transformStruct(param2.faceStruct,++param2.object.transformId,ma,mb,mc,md,me,mf,mg,mh,mi,mj,mk,ml);
}
if(param2.sorting == 3)
{
param2.next = _loc6_;
_loc6_ = param2;
}
else
{
if(param2.sorting == 2)
{
if(_loc8_ != null)
{
_loc9_.processNext = param2.faceStruct;
}
else
{
_loc8_ = param2.faceStruct;
}
_loc9_ = param2.faceStruct;
_loc9_.geometry = param2;
while(_loc9_.processNext != null)
{
_loc9_ = _loc9_.processNext;
_loc9_.geometry = param2;
}
}
else
{
if(_loc10_ != null)
{
_loc11_.processNext = param2.faceStruct;
}
else
{
_loc10_ = param2.faceStruct;
}
_loc11_ = param2.faceStruct;
_loc11_.geometry = param2;
while(_loc11_.processNext != null)
{
_loc11_ = _loc11_.processNext;
_loc11_.geometry = param2;
}
}
param2.faceStruct = null;
param2.next = _loc7_;
_loc7_ = param2;
}
param2 = _loc5_;
}
if(_loc7_ != null)
{
param2 = _loc7_;
while(param2.next != null)
{
param2 = param2.next;
}
param2.next = _loc6_;
}
else
{
_loc7_ = _loc6_;
}
if(_loc8_ != null)
{
_loc12_ = _loc8_;
_loc9_.processNext = _loc10_;
}
else
{
_loc12_ = _loc10_;
}
if(_loc6_ != null)
{
_loc6_.faceStruct.geometry = _loc6_;
_loc12_ = this.collectNode(_loc6_.faceStruct,_loc12_,param1,this.threshold,true);
_loc6_.faceStruct = null;
_loc6_ = _loc6_.next;
while(_loc6_ != null)
{
_loc6_.faceStruct.geometry = _loc6_;
_loc12_ = this.collectNode(_loc6_.faceStruct,_loc12_,param1,this.threshold,false);
_loc6_.faceStruct = null;
_loc6_ = _loc6_.next;
}
}
else if(_loc8_ != null)
{
_loc12_ = this.collectNode(null,_loc12_,param1,this.threshold,true);
}
else if(_loc10_ != null)
{
_loc12_ = param1.sortByAverageZ(_loc12_);
}
_loc3_ = _loc12_;
while(_loc3_ != null)
{
_loc4_ = _loc3_.processNext;
param2 = _loc3_.geometry;
_loc3_.geometry = null;
_loc17_ = _loc4_ == null || param2 != _loc4_.geometry;
if(_loc17_ || _loc3_.material != _loc4_.material)
{
_loc3_.processNext = null;
if(_loc17_)
{
if(_loc13_ != null)
{
_loc14_.processNegative = _loc12_;
_loc13_ = null;
_loc14_ = null;
}
else
{
_loc12_.processPositive = _loc15_;
_loc15_ = _loc12_;
_loc15_.geometry = param2;
}
}
else
{
if(_loc13_ != null)
{
_loc14_.processNegative = _loc12_;
}
else
{
_loc12_.processPositive = _loc15_;
_loc15_ = _loc12_;
_loc15_.geometry = param2;
_loc13_ = _loc12_;
}
_loc14_ = _loc12_;
}
_loc12_ = _loc4_;
}
_loc3_ = _loc4_;
}
if(param1.debug)
{
_loc12_ = _loc15_;
while(_loc12_ != null)
{
if(_loc12_.geometry.debug & Debug.EDGES)
{
_loc3_ = _loc12_;
while(_loc3_ != null)
{
Debug.drawEdges(param1,_loc3_,16711680);
_loc3_ = _loc3_.processNegative;
}
}
_loc12_ = _loc12_.processPositive;
}
}
while(_loc15_ != null)
{
_loc12_ = _loc15_;
_loc15_ = _loc12_.processPositive;
_loc12_.processPositive = null;
param2 = _loc12_.geometry;
_loc12_.geometry = null;
_loc16_ = null;
while(_loc12_ != null)
{
_loc4_ = _loc12_.processNegative;
if(_loc12_.material != null)
{
_loc12_.processNegative = _loc16_;
_loc16_ = _loc12_;
}
else
{
_loc12_.processNegative = null;
while(_loc12_ != null)
{
_loc3_ = _loc12_.processNext;
_loc12_.processNext = null;
_loc12_ = _loc3_;
}
}
_loc12_ = _loc4_;
}
_loc12_ = _loc16_;
while(_loc12_ != null)
{
_loc4_ = _loc12_.processNegative;
_loc12_.processNegative = null;
param1.addTransparent(_loc12_,param2.object);
_loc12_ = _loc4_;
}
}
param2 = _loc7_;
while(param2 != null)
{
_loc5_ = param2.next;
param2.destroy();
param2 = _loc5_;
}
}
private function collectNode(param1:Face, param2:Face, param3:Camera3D, param4:Number, param5:Boolean, param6:Face = null) : Face
{
var _loc7_:Wrapper = null;
var _loc8_:Vertex = null;
var _loc9_:Vertex = null;
var _loc10_:Vertex = null;
var _loc11_:Vertex = null;
var _loc12_:Number = NaN;
var _loc13_:Number = NaN;
var _loc14_:Number = NaN;
var _loc15_:Number = NaN;
var _loc16_:Face = null;
var _loc17_:Face = null;
var _loc18_:Face = null;
var _loc19_:VG = null;
var _loc22_:Face = null;
var _loc23_:Face = null;
var _loc24_:Face = null;
var _loc25_:Face = null;
var _loc26_:Face = null;
var _loc28_:Number = NaN;
var _loc29_:Number = NaN;
var _loc30_:Number = NaN;
var _loc31_:Number = NaN;
var _loc32_:Number = NaN;
var _loc33_:Number = NaN;
var _loc34_:Number = NaN;
var _loc35_:Number = NaN;
var _loc36_:Number = NaN;
var _loc37_:Number = NaN;
var _loc38_:Number = NaN;
var _loc39_:Number = NaN;
var _loc40_:Number = NaN;
var _loc41_:Number = NaN;
var _loc42_:Number = NaN;
var _loc43_:Number = NaN;
var _loc44_:Number = NaN;
var _loc45_:Boolean = false;
var _loc46_:Boolean = false;
var _loc47_:Number = NaN;
var _loc48_:Face = null;
var _loc49_:Face = null;
var _loc50_:Wrapper = null;
var _loc51_:Wrapper = null;
var _loc52_:Wrapper = null;
var _loc53_:Boolean = false;
var _loc54_:Number = NaN;
if(param1 != null)
{
_loc19_ = param1.geometry;
if(param1.offset < 0)
{
_loc17_ = param1.processNegative;
_loc18_ = param1.processPositive;
_loc12_ = param1.normalX;
_loc13_ = param1.normalY;
_loc14_ = param1.normalZ;
_loc15_ = param1.offset;
}
else
{
_loc17_ = param1.processPositive;
_loc18_ = param1.processNegative;
_loc12_ = -param1.normalX;
_loc13_ = -param1.normalY;
_loc14_ = -param1.normalZ;
_loc15_ = -param1.offset;
}
param1.processNegative = null;
param1.processPositive = null;
if(param1.wrapper != null)
{
_loc16_ = param1;
while(_loc16_.processNext != null)
{
_loc16_ = _loc16_.processNext;
_loc16_.geometry = _loc19_;
}
}
else
{
param1.geometry = null;
param1 = null;
}
}
else
{
param1 = param2;
param2 = param1.processNext;
_loc16_ = param1;
_loc7_ = param1.wrapper;
_loc8_ = _loc7_.vertex;
_loc7_ = _loc7_.next;
_loc9_ = _loc7_.vertex;
_loc28_ = _loc8_.cameraX;
_loc29_ = _loc8_.cameraY;
_loc30_ = _loc8_.cameraZ;
_loc31_ = _loc9_.cameraX - _loc28_;
_loc32_ = _loc9_.cameraY - _loc29_;
_loc33_ = _loc9_.cameraZ - _loc30_;
_loc12_ = 0;
_loc13_ = 0;
_loc14_ = 1;
_loc15_ = _loc30_;
_loc34_ = 0;
_loc7_ = _loc7_.next;
while(_loc7_ != null)
{
_loc11_ = _loc7_.vertex;
_loc35_ = _loc11_.cameraX - _loc28_;
_loc36_ = _loc11_.cameraY - _loc29_;
_loc37_ = _loc11_.cameraZ - _loc30_;
_loc38_ = _loc37_ * _loc32_ - _loc36_ * _loc33_;
_loc39_ = _loc35_ * _loc33_ - _loc37_ * _loc31_;
_loc40_ = _loc36_ * _loc31_ - _loc35_ * _loc32_;
_loc41_ = _loc38_ * _loc38_ + _loc39_ * _loc39_ + _loc40_ * _loc40_;
if(_loc41_ > param4)
{
_loc41_ = 1 / Math.sqrt(_loc41_);
_loc12_ = _loc38_ * _loc41_;
_loc13_ = _loc39_ * _loc41_;
_loc14_ = _loc40_ * _loc41_;
_loc15_ = _loc28_ * _loc12_ + _loc29_ * _loc13_ + _loc30_ * _loc14_;
break;
}
if(_loc41_ > _loc34_)
{
_loc41_ = 1 / Math.sqrt(_loc41_);
_loc12_ = _loc38_ * _loc41_;
_loc13_ = _loc39_ * _loc41_;
_loc14_ = _loc40_ * _loc41_;
_loc15_ = _loc28_ * _loc12_ + _loc29_ * _loc13_ + _loc30_ * _loc14_;
_loc34_ = _loc41_;
}
_loc7_ = _loc7_.next;
}
}
var _loc20_:Number = _loc15_ - param4;
var _loc21_:Number = _loc15_ + param4;
var _loc27_:Face = param2;
while(_loc27_ != null)
{
_loc26_ = _loc27_.processNext;
_loc7_ = _loc27_.wrapper;
_loc8_ = _loc7_.vertex;
_loc7_ = _loc7_.next;
_loc9_ = _loc7_.vertex;
_loc7_ = _loc7_.next;
_loc10_ = _loc7_.vertex;
_loc7_ = _loc7_.next;
_loc42_ = _loc8_.cameraX * _loc12_ + _loc8_.cameraY * _loc13_ + _loc8_.cameraZ * _loc14_;
_loc43_ = _loc9_.cameraX * _loc12_ + _loc9_.cameraY * _loc13_ + _loc9_.cameraZ * _loc14_;
_loc44_ = _loc10_.cameraX * _loc12_ + _loc10_.cameraY * _loc13_ + _loc10_.cameraZ * _loc14_;
_loc45_ = _loc42_ < _loc20_ || _loc43_ < _loc20_ || _loc44_ < _loc20_;
_loc46_ = _loc42_ > _loc21_ || _loc43_ > _loc21_ || _loc44_ > _loc21_;
while(_loc7_ != null)
{
_loc11_ = _loc7_.vertex;
_loc47_ = _loc11_.cameraX * _loc12_ + _loc11_.cameraY * _loc13_ + _loc11_.cameraZ * _loc14_;
if(_loc47_ < _loc20_)
{
_loc45_ = true;
}
else if(_loc47_ > _loc21_)
{
_loc46_ = true;
}
_loc11_.offset = _loc47_;
_loc7_ = _loc7_.next;
}
if(!_loc45_)
{
if(!_loc46_)
{
if(param1 != null)
{
_loc16_.processNext = _loc27_;
}
else
{
param1 = _loc27_;
}
_loc16_ = _loc27_;
}
else
{
if(_loc24_ != null)
{
_loc25_.processNext = _loc27_;
}
else
{
_loc24_ = _loc27_;
}
_loc25_ = _loc27_;
}
}
else if(!_loc46_)
{
if(_loc22_ != null)
{
_loc23_.processNext = _loc27_;
}
else
{
_loc22_ = _loc27_;
}
_loc23_ = _loc27_;
}
else
{
_loc8_.offset = _loc42_;
_loc9_.offset = _loc43_;
_loc10_.offset = _loc44_;
_loc48_ = _loc27_.create();
_loc48_.material = _loc27_.material;
_loc48_.geometry = _loc27_.geometry;
param3.lastFace.next = _loc48_;
param3.lastFace = _loc48_;
_loc49_ = _loc27_.create();
_loc49_.material = _loc27_.material;
_loc49_.geometry = _loc27_.geometry;
param3.lastFace.next = _loc49_;
param3.lastFace = _loc49_;
_loc50_ = null;
_loc51_ = null;
_loc7_ = _loc27_.wrapper.next.next;
while(_loc7_.next != null)
{
_loc7_ = _loc7_.next;
}
_loc8_ = _loc7_.vertex;
_loc42_ = _loc8_.offset;
_loc53_ = _loc27_.material != null && _loc27_.material.useVerticesNormals;
_loc7_ = _loc27_.wrapper;
while(_loc7_ != null)
{
_loc9_ = _loc7_.vertex;
_loc43_ = _loc9_.offset;
if(_loc42_ < _loc20_ && _loc43_ > _loc21_ || _loc42_ > _loc21_ && _loc43_ < _loc20_)
{
_loc54_ = (_loc15_ - _loc42_) / (_loc43_ - _loc42_);
_loc11_ = _loc9_.create();
param3.lastVertex.next = _loc11_;
param3.lastVertex = _loc11_;
_loc11_.cameraX = _loc8_.cameraX + (_loc9_.cameraX - _loc8_.cameraX) * _loc54_;
_loc11_.cameraY = _loc8_.cameraY + (_loc9_.cameraY - _loc8_.cameraY) * _loc54_;
_loc11_.cameraZ = _loc8_.cameraZ + (_loc9_.cameraZ - _loc8_.cameraZ) * _loc54_;
_loc11_.u = _loc8_.u + (_loc9_.u - _loc8_.u) * _loc54_;
_loc11_.v = _loc8_.v + (_loc9_.v - _loc8_.v) * _loc54_;
if(_loc53_)
{
_loc11_.x = _loc8_.x + (_loc9_.x - _loc8_.x) * _loc54_;
_loc11_.y = _loc8_.y + (_loc9_.y - _loc8_.y) * _loc54_;
_loc11_.z = _loc8_.z + (_loc9_.z - _loc8_.z) * _loc54_;
_loc11_.normalX = _loc8_.normalX + (_loc9_.normalX - _loc8_.normalX) * _loc54_;
_loc11_.normalY = _loc8_.normalY + (_loc9_.normalY - _loc8_.normalY) * _loc54_;
_loc11_.normalZ = _loc8_.normalZ + (_loc9_.normalZ - _loc8_.normalZ) * _loc54_;
}
_loc52_ = _loc7_.create();
_loc52_.vertex = _loc11_;
if(_loc50_ != null)
{
_loc50_.next = _loc52_;
}
else
{
_loc48_.wrapper = _loc52_;
}
_loc50_ = _loc52_;
_loc52_ = _loc7_.create();
_loc52_.vertex = _loc11_;
if(_loc51_ != null)
{
_loc51_.next = _loc52_;
}
else
{
_loc49_.wrapper = _loc52_;
}
_loc51_ = _loc52_;
}
if(_loc43_ <= _loc21_)
{
_loc52_ = _loc7_.create();
_loc52_.vertex = _loc9_;
if(_loc50_ != null)
{
_loc50_.next = _loc52_;
}
else
{
_loc48_.wrapper = _loc52_;
}
_loc50_ = _loc52_;
}
if(_loc43_ >= _loc20_)
{
_loc52_ = _loc7_.create();
_loc52_.vertex = _loc9_;
if(_loc51_ != null)
{
_loc51_.next = _loc52_;
}
else
{
_loc49_.wrapper = _loc52_;
}
_loc51_ = _loc52_;
}
_loc8_ = _loc9_;
_loc42_ = _loc43_;
_loc7_ = _loc7_.next;
}
if(_loc22_ != null)
{
_loc23_.processNext = _loc48_;
}
else
{
_loc22_ = _loc48_;
}
_loc23_ = _loc48_;
if(_loc24_ != null)
{
_loc25_.processNext = _loc49_;
}
else
{
_loc24_ = _loc49_;
}
_loc25_ = _loc49_;
_loc27_.processNext = null;
_loc27_.geometry = null;
}
_loc27_ = _loc26_;
}
if(_loc18_ != null)
{
_loc18_.geometry = _loc19_;
if(_loc25_ != null)
{
_loc25_.processNext = null;
}
param6 = this.collectNode(_loc18_,_loc24_,param3,param4,param5,param6);
}
else if(_loc24_ != null)
{
if(param5 && _loc24_ != _loc25_)
{
if(_loc25_ != null)
{
_loc25_.processNext = null;
}
if(_loc24_.geometry.sorting == 2)
{
param6 = this.collectNode(null,_loc24_,param3,param4,param5,param6);
}
else
{
_loc24_ = param3.sortByAverageZ(_loc24_);
_loc25_ = _loc24_.processNext;
while(_loc25_.processNext != null)
{
_loc25_ = _loc25_.processNext;
}
_loc25_.processNext = param6;
param6 = _loc24_;
}
}
else
{
_loc25_.processNext = param6;
param6 = _loc24_;
}
}
if(param1 != null)
{
_loc16_.processNext = param6;
param6 = param1;
}
if(_loc17_ != null)
{
_loc17_.geometry = _loc19_;
if(_loc23_ != null)
{
_loc23_.processNext = null;
}
param6 = this.collectNode(_loc17_,_loc22_,param3,param4,param5,param6);
}
else if(_loc22_ != null)
{
if(param5 && _loc22_ != _loc23_)
{
if(_loc23_ != null)
{
_loc23_.processNext = null;
}
if(_loc22_.geometry.sorting == 2)
{
param6 = this.collectNode(null,_loc22_,param3,param4,param5,param6);
}
else
{
_loc22_ = param3.sortByAverageZ(_loc22_);
_loc23_ = _loc22_.processNext;
while(_loc23_.processNext != null)
{
_loc23_ = _loc23_.processNext;
}
_loc23_.processNext = param6;
param6 = _loc22_;
}
}
else
{
_loc23_.processNext = param6;
param6 = _loc22_;
}
}
return param6;
}
}
}
|
package alternativa.tanks.models.weapons.shell {
import alternativa.math.Vector3;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.models.weapons.shell.states.ShellStates;
[ModelInterface]
public interface ShellWeaponCommunication {
function tryToShoot(param1:int, param2:int, param3:int, param4:Vector3) : void;
function tryToShootWithTarget(param1:int, param2:int, param3:int, param4:Vector3, param5:Tank, param6:Vector3) : void;
function tryToDummyShoot(param1:int, param2:int) : void;
function tryToHit(param1:int, param2:ShellStates, param3:Tank = null) : void;
}
}
|
package alternativa.tanks.model.quest.common.gui.window.buttons.skin {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.model.quest.common.gui.window.buttons.skin.GreenBigButtonSkin_rightUpClass.png")]
public class GreenBigButtonSkin_rightUpClass extends BitmapAsset {
public function GreenBigButtonSkin_rightUpClass() {
super();
}
}
}
|
package alternativa.tanks.controller.events {
import flash.events.Event;
public class SetPasswordChangeResultEvent extends Event {
public static const SET:String = "SetPasswordChangeResultEvent.SET";
public var error:String;
public var success:Boolean;
public function SetPasswordChangeResultEvent(param1:Boolean, param2:String) {
this.success = param1;
this.error = param2;
super(SET);
}
}
}
|
package alternativa.tanks.gui.communication.tabs.chat {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.chat.*;
import alternativa.tanks.gui.chat.dropdown.ChatDropDownList;
import alternativa.tanks.gui.communication.tabs.*;
import alternativa.tanks.model.chat.ShowChat;
import controls.TankWindowInner;
import controls.base.DefaultButtonBase;
import controls.base.LabelBase;
import controls.base.TankInputBase;
import fl.controls.LabelButton;
import fl.controls.ScrollBar;
import fl.events.ScrollEvent;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.text.GridFitType;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.ui.Keyboard;
import flash.utils.Timer;
import forms.ColorConstants;
import forms.events.LoginFormEvent;
import forms.userlabel.UserLabelClickWithCtrlEvent;
import projects.tanks.client.chat.models.chat.chat.ChatAddressMode;
import projects.tanks.client.chat.types.MessageType;
import projects.tanks.client.chat.types.UserStatus;
import projects.tanks.client.users.services.chatmoderator.ChatModeratorLevel;
import projects.tanks.clients.flash.commons.services.validate.ValidateService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.blockuser.IBlockUserService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.storage.IStorageService;
import services.contextmenu.ContextMenuServiceEvent;
import services.contextmenu.IContextMenuService;
import utils.ScrollStyleUtils;
public class ChatTab extends AbstractCommunicationPanelTab implements ShowChat {
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var contextMenuService:IContextMenuService;
[Inject]
public static var blockUserService:IBlockUserService;
[Inject]
public static var storageService:IStorageService;
private static const ADDITIONAL_SCROLL_AREA_HEIGHT:Number = 7;
private static const UNAVAILABLE_TIMER_PERIOD:int = 1000;
private static const LAST_MESSAGE_SHARED_KEY:String = "lobbyChatLastMessageKey";
private static const LAST_CHAT_CHANNEL_KEY:String = "lastChatChannelKey";
private static const BLOCK_COMMAND_PATTERN:RegExp = /^\s*\/block\s+(\S+)/i;
private static const UNBLOCK_COMMAND_PATTERN:RegExp = /^\s*\/unblock\s+(\S+)/i;
private static const ADDRESS_PATTERN:RegExp = new RegExp("^" + ValidateService.PLAIN_UID_PATTERN + "(: |; )","i");
private static const REPLY_PATTERN:RegExp = /^re(: |; )(.*)/i;
private static const ADDRESS_MESSAGE_PATTERN:RegExp = /^([^:;]*)(: |; )(.*)/;
private static const UNBLOCKALL_COMMAND_PATTERN:RegExp = /^\s*\/unblockall/i;
private static const BLOCKLIST_COMMAND_PATTERN:RegExp = /^\s*\/blocklist/i;
private static const SHOWIP_COMMAND_PATTERN:RegExp = /^\s*\/showip/i;
private static const HIDEIP_COMMAND_PATTERN:RegExp = /^\s*\/hideip/i;
public static const SEND_BUTTON_WIDTH:int = 80;
private var inner:TankWindowInner = new TankWindowInner(100,100,TankWindowInner.GREEN);
private var inputControl:TankInputBase = new TankInputBase();
private var input:TextField;
private var disabledChatLabel:LabelBase = new LabelBase();
private var addressMode:ChatAddressMode = ChatAddressMode.PUBLIC_TO_ALL;
private var isChatEnabled:Boolean;
private var isChatAvailable:Boolean = true;
private var selectedUid:String = "";
private var previousSelectedUid:String;
private var delayTimer:Timer;
private var sendButton:DefaultButtonBase = new DefaultButtonBase();
private var _selfUid:String;
private var lastRespondent:String;
private var systemUserStatus:UserStatus = new UserStatus(ChatModeratorLevel.NONE,"",0,"System",null);
private var emptyUserStatus:UserStatus = new UserStatus(ChatModeratorLevel.NONE,"",0,"",null);
private var _lastMessageTime:Number = 0;
private var symbolCost:int;
private var messageCost:int;
private var coloredTextFormat:TextFormat;
private var standardTextFormat:TextFormat;
private var _typingAntifloodEnabled:Boolean;
private var privateMessagesEnabled:Boolean;
private var message:String = "";
private var channels:Vector.<String>;
private var currentChannel:String;
public var output:ChatOutput;
public function ChatTab(param1:Boolean) {
super();
this.privateMessagesEnabled = param1;
this.output = new ChatOutput(param1);
}
public function set selfUid(param1:String) : void {
this._selfUid = param1;
this.output.selfUid = this._selfUid;
}
public function init() : void {
this.input = this.inputControl.textField;
this.input.maxChars = 299;
addChild(this.inner);
this.inner.x = this.inner.y = 11;
this.inner.showBlink = true;
this.input.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyPressed);
this.input.addEventListener(MouseEvent.CLICK,this.onInputClick);
this.sendButton.addEventListener(MouseEvent.CLICK,this.sendMessage);
addChild(this.inputControl);
addChild(this.disabledChatLabel);
this.disabledChatLabel.mouseEnabled = false;
this.disabledChatLabel.color = ColorConstants.LIST_LABEL_HINT;
this.disabledChatLabel.text = localeService.getText(TanksLocale.TEXT_DISABLED_CHAT_LABEL_TEXT);
addChild(this.output);
this.output.move(15,15);
ScrollStyleUtils.setGreenStyle(this.output);
this.output.addEventListener(UserLabelClickWithCtrlEvent.USER_LABEL_CLICK_WITH_CTRL_EVENT,this.onClickWithCtrlUserLabel);
this.output.addEventListener(ScrollEvent.SCROLL,this.onScroll);
this.output.verticalScrollBar.addEventListener(Event.ENTER_FRAME,this.updateScrollOnEnterFrame);
this.inputControl.addEventListener(LoginFormEvent.TEXT_CHANGED,this.processMessageTyping);
contextMenuService.addEventListener(ContextMenuServiceEvent.WRITE_IN_PUBLIC,this.onClickWriteInChatContextMenu);
contextMenuService.addEventListener(ContextMenuServiceEvent.WRITE_IN_PRIVATE,this.onClickWriteInChatContextMenu);
this.sendButton.width = SEND_BUTTON_WIDTH;
this.sendButton.label = localeService.getText(TanksLocale.TEXT_CHAT_PANEL_BUTTON_SEND);
addChild(this.sendButton);
var local1:Timer = new Timer(UNAVAILABLE_TIMER_PERIOD);
local1.addEventListener(TimerEvent.TIMER,this.onAntifloodTimer);
local1.start();
this.input.gridFitType = GridFitType.SUBPIXEL;
this.coloredTextFormat = new TextFormat();
this.coloredTextFormat.color = 16728642;
this.standardTextFormat = new TextFormat();
this.standardTextFormat.color = 16777215;
if(Boolean(storageService.getStorage().data[LAST_MESSAGE_SHARED_KEY])) {
this._lastMessageTime = storageService.getStorage().data[LAST_MESSAGE_SHARED_KEY];
} else {
this._lastMessageTime = 0;
}
}
override public function render() : void {
this.init();
this.output.scrollDown();
}
private function onClickWithCtrlUserLabel(param1:UserLabelClickWithCtrlEvent) : void {
this.pasteUidToInput(param1.uid,param1.shiftPressed ? ChatAddressMode.PRIVATE : ChatAddressMode.PUBLIC_ADDRESSED);
}
private function onClickWriteInChatContextMenu(param1:ContextMenuServiceEvent) : void {
this.pasteUidToInput(param1.uid,param1.type == ContextMenuServiceEvent.WRITE_IN_PUBLIC ? ChatAddressMode.PUBLIC_ADDRESSED : ChatAddressMode.PRIVATE);
}
private function onAntifloodTimer(param1:TimerEvent) : void {
this.updateTypingAntiflood();
}
private function updateScrollOnEnterFrame(param1:Event) : void {
var local4:Sprite = null;
var local5:Sprite = null;
var local2:ScrollBar = this.output.verticalScrollBar;
var local3:int = 0;
while(local3 < local2.numChildren) {
local4 = Sprite(local2.getChildAt(local3));
if(local4.hitArea != null) {
local5 = local4.hitArea;
local5.graphics.clear();
} else {
local5 = new Sprite();
local5.mouseEnabled = false;
local4.hitArea = local5;
this.output.addChild(local5);
}
local5.graphics.beginFill(0,0);
if(local4 is LabelButton) {
local5.graphics.drawRect(local2.x - ADDITIONAL_SCROLL_AREA_HEIGHT,local4.y - 14,local4.width + ADDITIONAL_SCROLL_AREA_HEIGHT,local4.height + 28);
} else {
local5.graphics.drawRect(local2.x - ADDITIONAL_SCROLL_AREA_HEIGHT,local4.y,local4.width + ADDITIONAL_SCROLL_AREA_HEIGHT,local4.height);
}
local5.graphics.endFill();
local3++;
}
}
private function onInputClick(param1:MouseEvent) : void {
if(stage.focus == null) {
stage.focus = this.input;
}
}
private function onScroll(param1:ScrollEvent) : void {
this.output.deltaWidth = 18;
this.output.setSize(this.inner.width + 1,this.inner.height - 8);
this.output.removeEventListener(ScrollEvent.SCROLL,this.onScroll);
this.output.wasScrolled = true;
}
private function processMessageTyping(param1:Event) : void {
var local2:String = null;
var local3:Array = null;
if(this.input.text.search(REPLY_PATTERN) != -1) {
if(this.lastRespondent == null) {
this.input.text = "";
return;
}
local3 = this.input.text.match(REPLY_PATTERN);
this.addressMode = ChatAddressModeUtil.parseAddressMode(local3[1]);
this.message = local3[2];
this.input.text = this.lastRespondent + local3[1] + this.message;
this.selectedUid = this.lastRespondent;
this.input.setSelection(this.input.length,this.input.length);
} else if(this.input.text.search(ADDRESS_PATTERN) != -1) {
local3 = this.input.text.match(ADDRESS_MESSAGE_PATTERN);
this.selectedUid = local3[1];
local2 = local3[2];
this.message = local3[3];
this.addressMode = ChatAddressModeUtil.parseAddressMode(local2);
} else {
this.addressMode = ChatAddressMode.PUBLIC_TO_ALL;
this.selectedUid = "";
this.message = this.input.text;
}
this.highlightUidInChat(this.selectedUid,false);
this.updateTypingAntiflood();
}
private function pasteUidToInput(param1:String, param2:ChatAddressMode) : void {
this.addressMode = param2;
this.input.text = param1 + ChatAddressModeUtil.getAddressMarker(param2) + this.message;
stage.focus = this.input;
this.input.setSelection(this.input.length,this.input.length);
this.selectedUid = param1;
this.highlightUidInChat(this.selectedUid,false);
this.updateTypingAntiflood();
}
private function highlightUidInChat(param1:String, param2:Boolean) : void {
if(param2 || this.previousSelectedUid != param1) {
this.previousSelectedUid = param1;
this.output.highlightUids(param1);
}
}
private function onKeyPressed(param1:KeyboardEvent) : void {
if(param1.keyCode == Keyboard.ENTER) {
this.send();
}
}
private function sendMessage(param1:MouseEvent) : void {
this.send();
}
private function processLocalChatCommand(param1:String) : Boolean {
var local3:String = null;
var local4:Array = null;
var local5:int = 0;
var local2:String = null;
if(param1.search(BLOCK_COMMAND_PATTERN) != -1) {
local3 = param1.replace(BLOCK_COMMAND_PATTERN,"$1");
blockUserService.blockUser(local3);
local2 = localeService.getText(TanksLocale.TEXT_CHAT_PANEL_COMMAND_BLOCK,local3);
this.input.text = "/block ";
} else if(param1.search(UNBLOCK_COMMAND_PATTERN) != -1) {
local3 = param1.replace(UNBLOCK_COMMAND_PATTERN,"$1");
blockUserService.unblockUser(local3);
local2 = localeService.getText(TanksLocale.TEXT_CHAT_PANEL_COMMAND_UNBLOCK,local3);
this.input.text = "/unblock ";
} else if(param1.search(UNBLOCKALL_COMMAND_PATTERN) != -1) {
blockUserService.unblockAll();
local2 = localeService.getText(TanksLocale.TEXT_CHAT_PANEL_COMMAND_UNBLOCK_ALL);
this.input.text = "";
} else if(param1.search(BLOCKLIST_COMMAND_PATTERN) != -1) {
local4 = blockUserService.getBlockList();
if(local4.length > 0) {
local2 = "\n" + localeService.getText(TanksLocale.TEXT_CHAT_PANEL_COMMAND_BLOCK_LIST) + "\nβββββββββββββ\n";
local5 = 0;
while(local5 < local4.length) {
local2 += String(local5 + 1) + ": " + local4[local5] + "\n";
local5++;
}
} else {
local2 = "...";
}
this.input.text = "";
} else if(param1.search(SHOWIP_COMMAND_PATTERN) != -1) {
this.output.setShowIPMode(true);
local2 = "show IP";
} else if(param1.search(HIDEIP_COMMAND_PATTERN) != -1) {
this.output.setShowIPMode(false);
local2 = "hide IP";
}
if(local2 != null) {
this.addMessageToCurrentChannel(this.systemUserStatus,this.emptyUserStatus,local2,null,MessageType.SYSTEM);
return true;
}
return false;
}
private function send() : void {
if(!this.isChatAvailable) {
return;
}
if(this.input.text == "") {
return;
}
var local1:String = this.message;
this.message = "";
if(this.processLocalChatCommand(this.input.text)) {
return;
}
if(ChatAddressModeUtil.isPersonal(this.addressMode)) {
dispatchEvent(new SendChatMessageEvent(local1,this.addressMode,this.selectedUid));
this.input.text = this.selectedUid + ChatAddressModeUtil.getAddressMarker(this.addressMode);
} else {
dispatchEvent(new SendChatMessageEvent(local1,ChatAddressMode.PUBLIC_TO_ALL));
this.input.text = "";
}
this.lastMessageTime = new Date().getTime();
this.input.setSelection(this.input.length,this.input.length);
this.output.scrollDown();
}
override public function resize(param1:int, param2:int) : void {
x = 1;
y = 37;
this.inner.width = param1;
this.inner.height = param2 - 35;
this.sendButton.y = param2 - 20;
this.sendButton.x = param1 - SEND_BUTTON_WIDTH + 11;
this.inputControl.x = 11;
this.inputControl.y = this.sendButton.y;
this.inputControl.width = this.sendButton.x - 16;
this.disabledChatLabel.x = this.inputControl.x + 3;
this.disabledChatLabel.y = this.inputControl.y + 7;
this.output.setSize(this.inner.width + 1,this.inner.height - 8);
if(this.delayTimer == null) {
this.delayTimer = new Timer(200,1);
this.delayTimer.addEventListener(TimerEvent.TIMER,this.correctResize);
}
this.delayTimer.reset();
this.delayTimer.start();
}
private function correctResize(param1:TimerEvent = null) : void {
this.output.setSize(this.inner.width + 1,this.inner.height - 8);
this.delayTimer.removeEventListener(TimerEvent.TIMER,this.correctResize);
this.delayTimer = null;
}
public function addMessageToCurrentChannel(param1:UserStatus, param2:UserStatus, param3:String, param4:ChatAddressMode = null, param5:MessageType = null, param6:Boolean = false) : void {
this.addMessage(param1,param2,this.currentChannel,param3,param4,param5,param6);
}
public function addMessage(param1:UserStatus, param2:UserStatus, param3:String, param4:String, param5:ChatAddressMode = null, param6:MessageType = null, param7:Boolean = false) : void {
if(param6 == null) {
param6 = MessageType.USER;
}
if(param6 == MessageType.WARNING) {
param7 = true;
}
if(param1 == null) {
param1 = this.emptyUserStatus;
}
if(param2 == null) {
param2 = this.emptyUserStatus;
}
if(blockUserService.isBlocked(param1.uid)) {
return;
}
this.output.addMessage(param1,param2,param5,param3,param4,param6,param7,isActive);
if(param3 == this.currentChannel) {
this.output.highlightUidsInLastMessage(this.selectedUid);
if(param2.uid == this._selfUid) {
this.lastRespondent = param1.uid;
}
}
}
override public function hide() : void {
if(this.delayTimer != null) {
this.delayTimer.stop();
this.delayTimer.removeEventListener(TimerEvent.TIMER,this.correctResize);
}
if(this.input != null) {
this.input.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyPressed);
this.input.removeEventListener(MouseEvent.CLICK,this.onInputClick);
}
if(this.sendButton != null) {
this.sendButton.removeEventListener(MouseEvent.CLICK,this.sendMessage);
}
if(this.output != null) {
this.output.verticalScrollBar.removeEventListener(Event.ENTER_FRAME,this.updateScrollOnEnterFrame);
this.output.removeEventListener(ScrollEvent.SCROLL,this.onScroll);
this.output.removeEventListener(UserLabelClickWithCtrlEvent.USER_LABEL_CLICK_WITH_CTRL_EVENT,this.onClickWithCtrlUserLabel);
}
if(this.inputControl != null) {
this.inputControl.removeEventListener(LoginFormEvent.TEXT_CHANGED,this.processMessageTyping);
}
contextMenuService.removeEventListener(ContextMenuServiceEvent.WRITE_IN_PUBLIC,this.onClickWriteInChatContextMenu);
contextMenuService.removeEventListener(ContextMenuServiceEvent.WRITE_IN_PRIVATE,this.onClickWriteInChatContextMenu);
}
public function cleanOutUsersMessages(param1:String) : void {
this.output.cleanOutUsersMessages(param1);
}
public function setShowChat(param1:Boolean) : void {
this.output.visible = param1;
if(!param1) {
this.inputControl.value = "";
}
this.isChatEnabled = param1;
this.updateSendButtonLabel();
this.updateDisabledChatLabel();
dispatchEvent(new ChatTabEvent(param1 ? ChatTabEvent.SHOW_CHAT : ChatTabEvent.HIDE_CHAT));
}
private function updateSendButtonLabel() : void {
if(this.isChatEnabled && !this.isChatAvailable) {
this.sendButton.enable = false;
} else {
this.sendButton.label = localeService.getText(TanksLocale.TEXT_CHAT_PANEL_BUTTON_SEND);
this.sendButton.enable = this.isChatEnabled;
}
}
private function updateDisabledChatLabel() : void {
if(this.isChatEnabled && !this.isChatAvailable) {
this.disabledChatLabel.text = localeService.getText(TanksLocale.TEXT_TYPING_SPEED_BANNED);
this.disabledChatLabel.visible = true;
this.inputControl.enable = false;
} else {
this.inputControl.enable = this.isChatEnabled;
this.disabledChatLabel.visible = !this.isChatEnabled;
}
}
private function updateTypingAntiflood() : void {
var local7:Number = NaN;
var local8:int = 0;
if(!this._typingAntifloodEnabled || !this.input) {
return;
}
var local1:String = this.input.text;
var local2:int = ChatAddressModeUtil.isPersonal(this.addressMode) ? this.selectedUid.length + 2 : 0;
var local3:int = ChatAddressModeUtil.isPersonal(this.addressMode) ? local1.length - local2 : local1.length;
var local4:int = local3 * this.symbolCost + this.messageCost;
var local5:Number = Number(new Date().getTime());
var local6:Number = this._lastMessageTime + local4;
if(!this.isCommand(local1) && local5 < local6) {
local7 = local6 - local5;
this.sendButton.label = this.getUnbanTime(local7);
this.sendButton.enable = false;
local8 = local7 / this.symbolCost;
if(local8 >= local3) {
if(local2 < local1.length) {
this.input.setTextFormat(this.coloredTextFormat,local2,local1.length);
}
} else if(local8 != 0) {
this.input.setTextFormat(this.standardTextFormat);
this.input.setTextFormat(this.coloredTextFormat,Math.min(local1.length + local2 - local8,local1.length - 1),local1.length);
}
this.isChatAvailable = false;
} else {
this.input.setTextFormat(this.standardTextFormat);
this.isChatAvailable = true;
}
this.updateSendButtonLabel();
}
private function getUnbanTime(param1:Number) : String {
var local2:Number = int(param1 / 1000);
var local3:Number = int(local2 / 60);
var local4:Number = local2 % 60;
var local5:String = local4.toString();
if(local5.length < 2) {
local5 = "0" + local5;
}
return local3.toString() + ":" + local5;
}
private function isCommand(param1:String) : Boolean {
return param1.search(/^\s*\//i) != -1;
}
public function set lastMessageTime(param1:Number) : void {
this._lastMessageTime = param1;
storageService.getStorage().data[LAST_MESSAGE_SHARED_KEY] = param1;
this.updateTypingAntiflood();
}
public function updateTypingAntifloodParams(param1:int, param2:int) : void {
this.symbolCost = param1;
this.messageCost = param2;
this.updateTypingAntiflood();
}
public function set typingAntifloodEnabled(param1:Boolean) : void {
this._typingAntifloodEnabled = param1;
}
public function getCurrentChannel() : String {
return this.currentChannel;
}
public function setCurrentChannel(param1:String) : void {
this.currentChannel = param1;
this.output.switchToChannel(isActive,this.currentChannel);
this.highlightUidInChat(this.selectedUid,true);
this.output.highlightUidsInLastMessage(this.selectedUid);
}
public function getChannels() : Vector.<String> {
return this.channels;
}
public function setChannels(param1:Vector.<String>) : void {
this.channels = param1;
}
public function onChangeChannel(param1:Event) : void {
this.setCurrentChannel((param1.target as ChatDropDownList).selectedItem.gameName);
storageService.getStorage().data[LAST_CHAT_CHANNEL_KEY] = this.currentChannel;
}
public function restoreCurrentChannel() : void {
var local1:String = storageService.getStorage().data[LAST_CHAT_CHANNEL_KEY];
var local2:int = 0;
while(local2 < this.channels.length) {
if(local1 == this.channels[local2]) {
this.setCurrentChannel(local1);
dispatchEvent(new ChangeChatChannelEvent(this.currentChannel));
return;
}
local2++;
}
this.setCurrentChannel(this.channels[0]);
storageService.getStorage().data[LAST_CHAT_CHANNEL_KEY] = this.currentChannel;
dispatchEvent(new ChangeChatChannelEvent(this.currentChannel));
}
}
}
|
package alternativa.tanks.sfx {
import alternativa.math.Vector3;
public interface PositionAndRotationProvider {
function readPositionAndRotation(param1:Vector3, param2:Vector3) : void;
}
}
|
package alternativa.tanks.models.weapon.twins {
import alternativa.math.Vector3;
import alternativa.physics.Body;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class TwinsWeaponCallbackEvents implements TwinsWeaponCallback {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function TwinsWeaponCallbackEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function onShot(param1:int, param2:int, param3:int, param4:Vector3) : void {
var i:int = 0;
var m:TwinsWeaponCallback = null;
var time:int = param1;
var shotId:int = param2;
var currentBarrel:int = param3;
var shotDirection:Vector3 = param4;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = TwinsWeaponCallback(this.impl[i]);
m.onShot(time,shotId,currentBarrel,shotDirection);
i++;
}
}
finally {
Model.popObject();
}
}
public function onDummyShot(param1:int, param2:int) : void {
var i:int = 0;
var m:TwinsWeaponCallback = null;
var time:int = param1;
var currentBarrel:int = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = TwinsWeaponCallback(this.impl[i]);
m.onDummyShot(time,currentBarrel);
i++;
}
}
finally {
Model.popObject();
}
}
public function onTargetHit(param1:int, param2:Body, param3:Vector3) : void {
var i:int = 0;
var m:TwinsWeaponCallback = null;
var shotId:int = param1;
var targetBody:Body = param2;
var hitPoint:Vector3 = param3;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = TwinsWeaponCallback(this.impl[i]);
m.onTargetHit(shotId,targetBody,hitPoint);
i++;
}
}
finally {
Model.popObject();
}
}
public function onStaticHit(param1:int, param2:Vector3) : void {
var i:int = 0;
var m:TwinsWeaponCallback = null;
var shotId:int = param1;
var position:Vector3 = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = TwinsWeaponCallback(this.impl[i]);
m.onStaticHit(shotId,position);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.models.weapon.ricochet
{
import alternativa.init.Main;
import alternativa.math.Vector3;
import alternativa.model.IModel;
import alternativa.model.IObjectLoadListener;
import alternativa.object.ClientObject;
import alternativa.physics.Body;
import alternativa.physics.collision.types.RayIntersection;
import alternativa.register.ObjectRegister;
import alternativa.service.IModelService;
import alternativa.tanks.engine3d.TextureAnimation;
import alternativa.tanks.models.battlefield.IBattleField;
import alternativa.tanks.models.sfx.SpriteShotEffect;
import alternativa.tanks.models.sfx.shoot.ricochet.IRicochetSFXModel;
import alternativa.tanks.models.sfx.shoot.ricochet.RicochetSFXData;
import alternativa.tanks.models.tank.ITank;
import alternativa.tanks.models.tank.TankData;
import alternativa.tanks.models.tank.TankModel;
import alternativa.tanks.models.weapon.IWeaponController;
import alternativa.tanks.models.weapon.WeaponUtils;
import alternativa.tanks.models.weapon.common.IWeaponCommonModel;
import alternativa.tanks.models.weapon.common.WeaponCommonData;
import alternativa.tanks.models.weapon.shared.CommonTargetEvaluator;
import alternativa.tanks.models.weapon.shared.shot.ShotData;
import alternativa.tanks.models.weapon.weakening.IWeaponWeakeningModel;
import alternativa.tanks.physics.CollisionGroup;
import alternativa.tanks.physics.TanksCollisionDetector;
import alternativa.tanks.services.objectpool.IObjectPoolService;
import alternativa.tanks.sfx.AnimatedSpriteEffectNew;
import alternativa.tanks.sfx.Sound3D;
import alternativa.tanks.sfx.Sound3DEffect;
import alternativa.tanks.sfx.SoundOptions;
import alternativa.tanks.sfx.StaticObject3DPositionProvider;
import alternativa.tanks.vehicles.tanks.Tank;
import com.alternativaplatform.projects.tanks.client.commons.types.Vector3d;
import com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.ricochet.IRicochetModelBase;
import com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.ricochet.RicochetModelBase;
import com.reygazu.anticheat.variables.SecureInt;
import com.reygazu.anticheat.variables.SecureNumber;
import flash.media.Sound;
import flash.utils.getTimer;
import scpacker.networking.INetworker;
import scpacker.networking.Network;
import scpacker.tanks.WeaponsManager;
public class RicochetModel extends RicochetModelBase implements IRicochetModelBase, IObjectLoadListener, IWeaponController, IRicochetShotListener
{
private static const EXPLOSION_SIZE:Number = 266;
private static var objectPoolService:IObjectPoolService;
private var weaponCommonModel:IWeaponCommonModel;
private var weakeningModel:IWeaponWeakeningModel;
private var battlefield:IBattleField;
private var tankModel:TankModel;
private var ricochetSfxModel:IRicochetSFXModel;
private var localTankData:TankData;
private var localRicochetData:RicochetData;
private var localRicochetSFXData:RicochetSFXData;
private var localShotData:ShotData;
private var localWeaponCommonData:WeaponCommonData;
private var triggerPressed:Boolean;
private var readyTime:SecureInt;
private var currentEnergy:SecureNumber;
private var targetSystem:RicochetTargetSystem;
private var weaponUtils:WeaponUtils;
private var _barrelOrigin:Vector3;
private var _gunDirGlobal:Vector3;
private var _xAxis:Vector3;
private var _muzzlePosGlobal:Vector3;
private var _shotDirection:Vector3;
private var _localPosition:Vector3;
private var _hitDirection:Vector3;
private var rayHit:RayIntersection;
private var SHOT_FLASH_SIZE:Number = 150;
private var SHOT_FLASH_DURATION:int = 100;
private var SHOT_FLASH_FADE:int = 100;
public function RicochetModel()
{
this.readyTime = new SecureInt("readyTime.value ricochet");
this.currentEnergy = new SecureNumber("currentEnergy.value ricochet");
this.weaponUtils = WeaponUtils.getInstance();
this._barrelOrigin = new Vector3();
this._gunDirGlobal = new Vector3();
this._xAxis = new Vector3();
this._muzzlePosGlobal = new Vector3();
this._shotDirection = new Vector3();
this._localPosition = new Vector3();
this._hitDirection = new Vector3();
this.rayHit = new RayIntersection();
super();
_interfaces.push(IModel,IObjectLoadListener,IWeaponController);
objectPoolService = IObjectPoolService(Main.osgi.getService(IObjectPoolService));
}
public function hit(clientObject:ClientObject, targetId:String, hitPoint:Vector3d, hitDirectionX:int, hitDirectionY:int, hitDirectionZ:int, weakeningCoeff:Number) : void
{
var targetData:TankData = this.getTankDataSafe(targetId,clientObject.register);
var td:TankData = clientObject.getParams(TankModel) as TankData;
if(targetData == null || td == null)
{
return;
}
var commonData:WeaponCommonData = this.weaponCommonModel.getCommonData(td.turret);
this._localPosition.vReset(hitPoint.x,hitPoint.y,hitPoint.z);
this._hitDirection.vReset(hitDirectionX / 32767,hitDirectionY / 32767,hitDirectionZ / 32767).vNormalize();
this.battlefield.tankHit(targetData,this._hitDirection,weakeningCoeff * commonData.impactCoeff);
this._hitDirection.vScale(weakeningCoeff * commonData.impactForce);
targetData.tank.addWorldForceAtLocalPoint(this._localPosition,this._hitDirection);
}
public function fire(clientObject:ClientObject, shooterId:String, shotDirectionX:int, shotDirectionY:int, shotDirectionZ:int) : void
{
var shooterData:TankData = this.getTankDataSafe(shooterId,clientObject.register);
if(shooterData == null || shooterData.tank == null || shooterData.tank.skin == null)
{
return;
}
if(this.tankModel.localUserData != null)
{
if(shooterData == this.tankModel.localUserData)
{
return;
}
}
var ricochetData:RicochetData = RicochetData(shooterData.turret.getParams(RicochetData));
var commonData:WeaponCommonData = this.weaponCommonModel.getCommonData(shooterData.turret);
var sfxData:RicochetSFXData = this.ricochetSfxModel.getSfxData(shooterData.turret);
var muzzlePosLocal:Vector3 = commonData.muzzles[0];
this.weaponUtils.calculateGunParams(shooterData.tank.skin.turretMesh,muzzlePosLocal,this._muzzlePosGlobal,this._barrelOrigin,this._xAxis,this._gunDirGlobal);
this._shotDirection.vReset(shotDirectionX / 32767,shotDirectionY / 32767,shotDirectionZ / 32767).vNormalize();
this.createShotEffects(shooterData,ricochetData,sfxData,commonData,muzzlePosLocal,this._muzzlePosGlobal,this._shotDirection,this._gunDirGlobal);
}
public function hitSelf(clientObject:ClientObject, shooterId:String, relativeHitPosition:int) : void
{
var shooterData:TankData = this.getTankDataSafe(shooterId,clientObject.register);
if(shooterData == null)
{
return;
}
var commonData:WeaponCommonData = this.weaponCommonModel.getCommonData(clientObject);
var sfxData:RicochetSFXData = this.ricochetSfxModel.getSfxData(clientObject);
var muzzlePosLocal:Vector3 = commonData.muzzles[0];
this.weaponUtils.calculateGunParams(shooterData.tank.skin.turretMesh,muzzlePosLocal,this._muzzlePosGlobal,this._barrelOrigin,this._xAxis,this._gunDirGlobal);
this.createSelfHitEffects(shooterData,sfxData,commonData,relativeHitPosition,this._barrelOrigin,this._gunDirGlobal);
}
public function initObject(clientObject:ClientObject, energyCapacity:int, energyPerShot:int, energyRechargeSpeed:Number, shotDistance:Number, shotRadius:Number, shotSpeed:Number) : void
{
var modelService:IModelService = null;
var weaponData:RicochetData = new RicochetData(100 * shotRadius,100 * shotSpeed,energyCapacity,energyPerShot,energyRechargeSpeed,100 * shotDistance);
clientObject.putParams(RicochetData,weaponData);
WeaponsManager.getRicochetSFXModel(clientObject);
if(this.battlefield == null)
{
modelService = IModelService(Main.osgi.getService(IModelService));
this.battlefield = IBattleField(modelService.getModelsByInterface(IBattleField)[0]);
this.tankModel = TankModel(Main.osgi.getService(ITank));
this.weaponCommonModel = IWeaponCommonModel(modelService.getModelsByInterface(IWeaponCommonModel)[0]);
}
this.objectLoaded(clientObject);
}
public function objectLoaded(object:ClientObject) : void
{
var modelService:IModelService = null;
if(this.weakeningModel == null)
{
modelService = IModelService(Main.osgi.getService(IModelService));
this.weakeningModel = IWeaponWeakeningModel(modelService.getModelsByInterface(IWeaponWeakeningModel)[0]);
this.ricochetSfxModel = WeaponsManager.getRicochetSFXModel(object);
}
}
public function objectUnloaded(object:ClientObject) : void
{
}
public function stopEffects(ownerTankData:TankData) : void
{
}
public function reset() : void
{
this.readyTime.value = 0;
this.currentEnergy.value = this.localRicochetData.energyCapacity;
}
public function setLocalUser(localUserData:TankData) : void
{
var turretObject:ClientObject = localUserData.turret;
this.localTankData = localUserData;
this.localRicochetData = RicochetData(turretObject.getParams(RicochetData));
this.localRicochetSFXData = RicochetSFXData(turretObject.getParams(RicochetSFXData));
var modelService:IModelService = IModelService(Main.osgi.getService(IModelService));
this.localShotData = WeaponsManager.shotDatas[turretObject.id];
this.localWeaponCommonData = this.weaponCommonModel.getCommonData(localUserData.turret);
var battleField:IBattleField = IBattleField(modelService.getModelsByInterface(IBattleField)[0]);
var tanksCollisionDetector:TanksCollisionDetector = battleField.getBattlefieldData().collisionDetector;
var commonTargetEvaluator:CommonTargetEvaluator = CommonTargetEvaluator.create(this.localTankData,this.localShotData,this.battlefield,this.weakeningModel,modelService);
this.targetSystem = new RicochetTargetSystem(this.localShotData.autoAimingAngleUp.value,this.localShotData.numRaysUp.value,this.localShotData.autoAimingAngleDown.value,this.localShotData.numRaysDown.value,this.localRicochetData.shotDistance,tanksCollisionDetector,commonTargetEvaluator);
}
public function clearLocalUser() : void
{
this.localTankData = null;
this.localRicochetData = null;
this.localShotData = null;
this.localWeaponCommonData = null;
this.targetSystem = null;
}
public function activateWeapon(time:int) : void
{
this.triggerPressed = true;
}
public function deactivateWeapon(time:int, sendServerCommand:Boolean) : void
{
this.triggerPressed = false;
}
public function update(time:int, deltaTime:int) : Number
{
var energyCapacity:int = this.localRicochetData.energyCapacity;
if(this.currentEnergy.value < energyCapacity)
{
this.currentEnergy.value += this.localRicochetData.energyRechargeSpeed * deltaTime * 0.001;
if(this.currentEnergy.value > energyCapacity)
{
this.currentEnergy.value = energyCapacity;
}
}
if(this.triggerPressed && time >= this.readyTime.value && this.currentEnergy.value >= this.localRicochetData.energyPerShot)
{
this.doFire(this.localWeaponCommonData);
}
return this.currentEnergy.value / this.localRicochetData.energyCapacity;
}
public function shotHit(shot:RicochetShot, hitPoint:Vector3, hitDir:Vector3, targetBody:Body) : void
{
var targetTank:Tank = null;
var targetTankData:TankData = null;
var pos:Vector3 = null;
var hitPos3d:Vector3d = null;
var targetPos3d:Vector3d = null;
this.createExplosion(hitPoint,shot.sfxData);
if(shot.shooterData == this.localTankData)
{
targetTank = Tank(targetBody);
targetTankData = targetTank.tankData;
pos = new Vector3().vCopy(hitPoint).vSubtract(targetTank.state.pos);
pos.vTransformBy3Tr(targetTank.baseMatrix);
hitPos3d = new Vector3d(pos.x,pos.y,pos.z);
pos = targetTank.state.pos;
targetPos3d = new Vector3d(pos.x,pos.y,pos.z);
this.hitCommand(this.localTankData.turret,targetTankData.user.id,shot.id,targetTankData.incarnation,hitPos3d,targetPos3d,hitDir.x * 32767,hitDir.y * 32767,hitDir.z * 32767,0.01 * shot.totalDistance);
}
}
private function hitCommand(turr:ClientObject, victimId:String, shotId:int, inc:int, hitPos3d:Vector3d, targetPos3d:Vector3d, x:Number, y:Number, z:Number, distance:Number) : void
{
var js:Object = new Object();
js.victimId = victimId;
js.shotId = shotId;
js.distance = distance;
js.hitPos3d = hitPos3d;
js.x = x;
js.y = y;
js.z = z;
js.reloadTime = this.localShotData.reloadMsec.value;
Network(Main.osgi.getService(INetworker)).send("battle;fire;" + JSON.stringify(js));
}
private function createExplosion(position:Vector3, sfxData:RicochetSFXData) : void
{
var explosionEffect:AnimatedSpriteEffectNew = AnimatedSpriteEffectNew(objectPoolService.objectPool.getObject(AnimatedSpriteEffectNew));
var posProvider:StaticObject3DPositionProvider = StaticObject3DPositionProvider(objectPoolService.objectPool.getObject(StaticObject3DPositionProvider));
posProvider.init(position,50);
var animaton:TextureAnimation = sfxData.dataExplosion;
explosionEffect.init(EXPLOSION_SIZE,EXPLOSION_SIZE,animaton,Math.random() * Math.PI * 2,posProvider,0.5,0.5,null,0);
this.battlefield.addGraphicEffect(explosionEffect);
this.addSoundEffect(sfxData.explosionSound,position,SoundOptions.nearRadius,SoundOptions.farRadius,SoundOptions.farDelimiter,0.8);
}
private function addSoundEffect(sound:Sound, position:Vector3, nearRadius:Number, farRadius:Number, farDelimiter:Number, soundVolume:Number) : void
{
var sound3d:Sound3D = null;
var soundEffect:Sound3DEffect = null;
if(sound != null)
{
sound3d = Sound3D.create(sound,nearRadius,farRadius,farDelimiter,soundVolume);
soundEffect = Sound3DEffect.create(objectPoolService.objectPool,null,position,sound3d);
this.battlefield.addSound3DEffect(soundEffect);
}
}
private function doFire(param1:WeaponCommonData) : void
{
var _loc3_:int = 0;
var _loc4_:Vector3 = null;
var _loc5_:Vector3d = null;
var _loc6_:RicochetShot = null;
this.readyTime.value = getTimer() + this.localShotData.reloadMsec.value;
this.currentEnergy.value -= this.localRicochetData.energyPerShot;
var _loc2_:Vector3 = param1.muzzles[0];
this.weaponUtils.calculateGunParams(this.localTankData.tank.skin.turretMesh,_loc2_,this._muzzlePosGlobal,this._barrelOrigin,this._xAxis,this._gunDirGlobal);
if(this.battlefield.getBattlefieldData().collisionDetector.intersectRayWithStatic(this._barrelOrigin,this._gunDirGlobal,CollisionGroup.STATIC,_loc2_.y,null,this.rayHit))
{
_loc3_ = this.rayHit.t / _loc2_.y * 255 - 128;
_loc4_ = this.localTankData.tank.state.pos;
_loc5_ = new Vector3d(_loc4_.x,_loc4_.y,_loc4_.z);
this.createSelfHitEffects(this.localTankData,this.localRicochetSFXData,this.localWeaponCommonData,_loc3_,this._barrelOrigin,this._gunDirGlobal);
this.hitSelfCommand(this.localTankData.turret,this.localTankData.incarnation,_loc3_,_loc5_);
this.localTankData;
}
else if(this.battlefield.getBattlefieldData().collisionDetector.intersectRayWithStatic(this.localTankData.tank.state.pos,this._barrelOrigin.vClone().vRemove(this.localTankData.tank.state.pos).vNormalize(),CollisionGroup.STATIC,_loc2_.y,null,this.rayHit))
{
_loc3_ = this.rayHit.t / _loc2_.y * 255 - 128;
_loc4_ = this.localTankData.tank.state.pos;
_loc5_ = new Vector3d(_loc4_.x,_loc4_.y,_loc4_.z);
this.createSelfHitEffects(this.localTankData,this.localRicochetSFXData,this.localWeaponCommonData,_loc3_,this._barrelOrigin,this._gunDirGlobal);
this.hitSelfCommand(this.localTankData.turret,this.localTankData.incarnation,_loc3_,_loc5_);
}
else
{
if(!this.targetSystem.getShotDirection(this._muzzlePosGlobal,this._gunDirGlobal,this._xAxis,this.localTankData.tank,this._shotDirection))
{
this._shotDirection.vCopy(this._gunDirGlobal);
}
_loc6_ = this.createShotEffects(this.localTankData,this.localRicochetData,this.localRicochetSFXData,param1,_loc2_,this._muzzlePosGlobal,this._shotDirection,this._gunDirGlobal);
this.fireCommand(this.localTankData.turret,_loc6_.id,this._shotDirection.x * 32767,this._shotDirection.y * 32767,this._shotDirection.z * 32767);
}
}
private function hitSelfCommand(turr:ClientObject, inc:int, relativeHitPos:int, pos3d:Vector3d) : void
{
var js:Object = new Object();
js.self_hit = true;
js.reloadTime = this.localShotData.reloadMsec.value;
Network(Main.osgi.getService(INetworker)).send("battle;fire;" + JSON.stringify(js));
}
private function fireCommand(turr:ClientObject, shotid:int, x:Number, y:Number, z:Number) : void
{
var json:Object = new Object();
json.shotid = shotid;
json.x = x;
json.y = y;
json.z = z;
Network(Main.osgi.getService(INetworker)).send("battle;start_fire;" + JSON.stringify(json));
}
private function createShotEffects(shooterData:TankData, ricochetData:RicochetData, ricochetSFXData:RicochetSFXData, weaponCommonData:WeaponCommonData, localMuzzlePosition:Vector3, globalMuzzlePosition:Vector3, shotDirection:Vector3, gunDirection:Vector3) : RicochetShot
{
var sound:Sound3D = null;
var soundEffect:Sound3DEffect = null;
var ricochetShot:RicochetShot = RicochetShot(objectPoolService.objectPool.getObject(RicochetShot));
ricochetShot.init(globalMuzzlePosition,shotDirection,shooterData,ricochetData,ricochetSFXData,this.battlefield.getBattlefieldData().collisionDetector,this.weakeningModel,this,this.battlefield);
this.battlefield.addGraphicEffect(ricochetShot);
var shotFlashEffect:SpriteShotEffect = SpriteShotEffect(objectPoolService.objectPool.getObject(SpriteShotEffect));
shotFlashEffect.init(ricochetSFXData.shotFlashMaterial,localMuzzlePosition,shooterData.tank.skin.turretMesh,20,this.SHOT_FLASH_SIZE,this.SHOT_FLASH_DURATION,this.SHOT_FLASH_FADE,ricochetSFXData.colorTransform);
this.battlefield.addGraphicEffect(shotFlashEffect);
if(ricochetSFXData.shotSound != null)
{
sound = Sound3D.create(ricochetSFXData.shotSound,SoundOptions.nearRadius,SoundOptions.farRadius,SoundOptions.farDelimiter,0.8);
soundEffect = Sound3DEffect.create(objectPoolService.objectPool,null,globalMuzzlePosition,sound);
this.battlefield.addSound3DEffect(soundEffect);
}
shooterData.tank.addWorldForceScaled(globalMuzzlePosition,gunDirection,-weaponCommonData.kickback);
return ricochetShot;
}
private function createSelfHitEffects(shooterData:TankData, ricochetSFXData:RicochetSFXData, weaponCommonData:WeaponCommonData, relativeHitPos:int, globalBarrelOrigin:Vector3, gunDirection:Vector3) : void
{
var sound:Sound3D = null;
var soundEffect:Sound3DEffect = null;
var offsetAlongBarrel:Number = (relativeHitPos + 128) / 255 * weaponCommonData.muzzles[0].y;
var hitPos:Vector3 = globalBarrelOrigin.vClone();
hitPos.vAddScaled(offsetAlongBarrel,gunDirection);
if(ricochetSFXData.shotSound != null)
{
sound = Sound3D.create(ricochetSFXData.shotSound,SoundOptions.nearRadius,SoundOptions.farRadius,SoundOptions.farDelimiter,0.8);
soundEffect = Sound3DEffect.create(objectPoolService.objectPool,null,hitPos,sound);
this.battlefield.addSound3DEffect(soundEffect);
}
this.createExplosion(hitPos,ricochetSFXData);
shooterData.tank.addWorldForceScaled(globalBarrelOrigin,gunDirection,-weaponCommonData.impactForce);
}
private function getTankDataSafe(objectId:String, objectRegister:ObjectRegister) : TankData
{
var object:ClientObject = BattleController.activeTanks[objectId];
if(object == null)
{
return null;
}
var tankData:TankData = this.tankModel.getTankData(object);
if(tankData == null || tankData.tank == null)
{
return null;
}
return tankData;
}
}
}
|
package alternativa.tanks.service.battlelist {
import flash.events.Event;
import platform.client.fp10.core.type.IGameObject;
public class BattleListFormServiceEvent extends Event {
public static const BATTLE_SELECTED:String = "BattleListFormServiceEvent.BATTLE_SELECTED";
public static const BATTLE_UNSELECTED:String = "BattleListFormServiceEvent.BATTLE_UNSELECTED";
public var selectedItem:IGameObject;
public function BattleListFormServiceEvent(param1:String, param2:IGameObject = null) {
super(param1);
this.selectedItem = param2;
}
}
}
|
package alternativa.tanks.gui.icons {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.icons.PremiumIcon_smallPremiumIconClass.png")]
public class PremiumIcon_smallPremiumIconClass extends BitmapAsset {
public function PremiumIcon_smallPremiumIconClass() {
super();
}
}
}
|
package forms.friends
{
import controls.base.ColorButtonBase;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.MouseEvent;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
import forms.friends.button.friends.RequestCountIndicator;
public class FriendsWindowStateBigButton extends ColorButtonBase implements FriendsWindowButtonType
{
[Embed(source="1093.png")]
private static const ButtonCenter:Class;
[Embed(source="1110.png")]
private static const ButtonLeft:Class;
[Embed(source="1137.png")]
private static const ButtonRight:Class;
[Embed(source="1101.png")]
private static const ButtonOverCenter:Class;
[Embed(source="984.png")]
private static const ButtonOverLeft:Class;
[Embed(source="1122.png")]
private static const ButtonOverRight:Class;
[Embed(source="784.png")]
private static const ButtonDownCenter:Class;
[Embed(source="1135.png")]
private static const ButtonDownLeft:Class;
[Embed(source="999.png")]
private static const ButtonDownRight:Class;
[Embed(source="1128.png")]
private static const friendsClass:Class;
private static const friendsBitmapData:BitmapData = Bitmap(new friendsClass()).bitmapData;
private static const ICON_X:int = 6;
private static const ICON_Y:int = 5;
public var type:FriendsWindowState;
private var requestCounter:RequestCountIndicator;
private var icon:Bitmap;
public function FriendsWindowStateBigButton(param1:FriendsWindowState)
{
this.requestCounter = new RequestCountIndicator();
this.icon = new Bitmap();
super();
this.type = param1;
this.icon.bitmapData = this.getButtonIcon();
this.icon.x = ICON_X;
this.icon.y = ICON_Y;
addChild(this.icon);
_label.align = TextFormatAlign.LEFT;
_label.autoSize = TextFieldAutoSize.LEFT;
_label.x = ICON_X + this.icon.width + 5;
this.setStyle();
addChild(this.requestCounter);
this.requestCounter.y = -6;
}
public function set text(param1:String) : void
{
_label.text = param1;
}
private function getButtonIcon() : BitmapData
{
switch(this.type)
{
case FriendsWindowState.ACCEPTED:
return friendsBitmapData;
default:
return friendsBitmapData;
}
}
override public function setStyle(param1:String = "def") : void
{
stateUP.bmpLeft = new ButtonLeft().bitmapData;
stateUP.bmpCenter = new ButtonCenter().bitmapData;
stateUP.bmpRight = new ButtonRight().bitmapData;
stateOVER.bmpLeft = new ButtonOverLeft().bitmapData;
stateOVER.bmpCenter = new ButtonOverCenter().bitmapData;
stateOVER.bmpRight = new ButtonOverRight().bitmapData;
stateDOWN.bmpLeft = new ButtonDownLeft().bitmapData;
stateDOWN.bmpCenter = new ButtonDownCenter().bitmapData;
stateDOWN.bmpRight = new ButtonDownRight().bitmapData;
stateOFF.bmpLeft = new ButtonDownLeft().bitmapData;
stateOFF.bmpCenter = new ButtonDownCenter().bitmapData;
stateOFF.bmpRight = new ButtonDownRight().bitmapData;
}
override protected function onMouseEvent(param1:MouseEvent) : void
{
if(enable)
{
switch(param1.type)
{
case MouseEvent.MOUSE_OVER:
this.setState(2);
break;
case MouseEvent.MOUSE_OUT:
this.setState(1);
break;
case MouseEvent.MOUSE_DOWN:
this.setState(3);
break;
case MouseEvent.MOUSE_UP:
this.setState(1);
}
}
}
override protected function setState(param1:int = 0) : void
{
switch(param1)
{
case 0:
stateOFF.alpha = 1;
stateUP.alpha = 0;
stateOVER.alpha = 0;
stateDOWN.alpha = 0;
_label.y = 7;
this.icon.y = ICON_Y + 1;
break;
case 1:
stateOFF.alpha = 0;
stateUP.alpha = 1;
stateOVER.alpha = 0;
stateDOWN.alpha = 0;
_label.y = 6;
this.icon.y = ICON_Y;
break;
case 2:
stateOFF.alpha = 0;
stateUP.alpha = 0;
stateOVER.alpha = 1;
stateDOWN.alpha = 0;
_label.y = 6;
this.icon.y = ICON_Y;
break;
case 3:
stateOFF.alpha = 0;
stateUP.alpha = 0;
stateOVER.alpha = 0;
stateDOWN.alpha = 1;
_label.y = 7;
this.icon.y = ICON_Y + 1;
}
}
override public function set width(param1:Number) : void
{
super.width = param1;
this.requestCounter.x = _width + 3;
}
override public function get width() : Number
{
return _width;
}
public function setRequestCount(param1:int, param2:int) : void
{
this.requestCounter.setRequestCount(param1,param2);
}
public function set currentRequestCount(param1:int) : void
{
this.requestCounter.currentCount = param1;
}
public function set newRequestCount(param1:int) : void
{
this.requestCounter.newCount = param1;
}
public function getType() : FriendsWindowState
{
return this.type;
}
}
}
|
package projects.tanks.client.panel.model.shop.specialkit {
public class SpecialKitPackageCC {
private var _crystalsAmount:int;
private var _everySupplyAmount:int;
private var _goldAmount:int;
private var _itemsCount:int;
private var _premiumDurationInDays:int;
private var _showPremiumIcon:Boolean;
private var _texts:Vector.<ShopKitText>;
private var _withAdditionalItem:Boolean;
public function SpecialKitPackageCC(param1:int = 0, param2:int = 0, param3:int = 0, param4:int = 0, param5:int = 0, param6:Boolean = false, param7:Vector.<ShopKitText> = null, param8:Boolean = false) {
super();
this._crystalsAmount = param1;
this._everySupplyAmount = param2;
this._goldAmount = param3;
this._itemsCount = param4;
this._premiumDurationInDays = param5;
this._showPremiumIcon = param6;
this._texts = param7;
this._withAdditionalItem = param8;
}
public function get crystalsAmount() : int {
return this._crystalsAmount;
}
public function set crystalsAmount(param1:int) : void {
this._crystalsAmount = param1;
}
public function get everySupplyAmount() : int {
return this._everySupplyAmount;
}
public function set everySupplyAmount(param1:int) : void {
this._everySupplyAmount = param1;
}
public function get goldAmount() : int {
return this._goldAmount;
}
public function set goldAmount(param1:int) : void {
this._goldAmount = param1;
}
public function get itemsCount() : int {
return this._itemsCount;
}
public function set itemsCount(param1:int) : void {
this._itemsCount = param1;
}
public function get premiumDurationInDays() : int {
return this._premiumDurationInDays;
}
public function set premiumDurationInDays(param1:int) : void {
this._premiumDurationInDays = param1;
}
public function get showPremiumIcon() : Boolean {
return this._showPremiumIcon;
}
public function set showPremiumIcon(param1:Boolean) : void {
this._showPremiumIcon = param1;
}
public function get texts() : Vector.<ShopKitText> {
return this._texts;
}
public function set texts(param1:Vector.<ShopKitText>) : void {
this._texts = param1;
}
public function get withAdditionalItem() : Boolean {
return this._withAdditionalItem;
}
public function set withAdditionalItem(param1:Boolean) : void {
this._withAdditionalItem = param1;
}
public function toString() : String {
var local1:String = "SpecialKitPackageCC [";
local1 += "crystalsAmount = " + this.crystalsAmount + " ";
local1 += "everySupplyAmount = " + this.everySupplyAmount + " ";
local1 += "goldAmount = " + this.goldAmount + " ";
local1 += "itemsCount = " + this.itemsCount + " ";
local1 += "premiumDurationInDays = " + this.premiumDurationInDays + " ";
local1 += "showPremiumIcon = " + this.showPremiumIcon + " ";
local1 += "texts = " + this.texts + " ";
local1 += "withAdditionalItem = " + this.withAdditionalItem + " ";
return local1 + "]";
}
}
}
|
package controls.buttons.h50px {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.buttons.h50px.GreyBigButtonSkin_rightOverClass.png")]
public class GreyBigButtonSkin_rightOverClass extends BitmapAsset {
public function GreyBigButtonSkin_rightOverClass() {
super();
}
}
}
|
package {
import flash.display.Sprite;
import flash.system.Security;
[ExcludeClass]
public class _dbd5cbcb7832eb74d81473f352b0cc6ace96ad6c2a24d4f9c0fdbdd751f0b292_flash_display_Sprite extends Sprite {
public function _dbd5cbcb7832eb74d81473f352b0cc6ace96ad6c2a24d4f9c0fdbdd751f0b292_flash_display_Sprite() {
super();
}
public function allowDomainInRSL(... rest) : void {
Security.allowDomain.apply(null,rest);
}
public function allowInsecureDomainInRSL(... rest) : void {
Security.allowInsecureDomain.apply(null,rest);
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.