code stringlengths 57 237k |
|---|
package projects.tanks.client.panel.model.garage.resistance {
import projects.tanks.client.commons.types.ItemGarageProperty;
public class ResistancesCC {
private var _resistances:Vector.<ItemGarageProperty>;
public function ResistancesCC(param1:Vector.<ItemGarageProperty> = null) {
super();
this._resistances = param1;
}
public function get resistances() : Vector.<ItemGarageProperty> {
return this._resistances;
}
public function set resistances(param1:Vector.<ItemGarageProperty>) : void {
this._resistances = param1;
}
public function toString() : String {
var local1:String = "ResistancesCC [";
local1 += "resistances = " + this.resistances + " ";
return local1 + "]";
}
}
}
|
package forms.events
{
import flash.events.Event;
public class AlertEvent extends Event
{
public static const ALERT_BUTTON_PRESSED:String = "CloseAlert";
private var _typeButton:String;
public function AlertEvent(typeButton:String)
{
super(ALERT_BUTTON_PRESSED,true,false);
this._typeButton = typeButton;
}
public function get typeButton() : String
{
return this._typeButton;
}
}
}
|
package alternativa.engine3d.loaders.collada {
public namespace collada = "http://www.collada.org/2005/11/COLLADASchema";
}
|
package projects.tanks.client.garage.models.user.present {
public interface IPresentProfileModelBase {
}
}
|
package alternativa.tanks.model.profile
{
import alternativa.model.IResourceLoadListener;
import alternativa.tanks.model.gift.icons.ItemGiftBackgrounds;
import alternativa.tanks.model.profile.server.UserGiftServerItem;
import alternativa.types.Long;
import assets.icons.InputCheckIcon;
import assets.scroller.color.ScrollThumbSkinGreen;
import assets.scroller.color.ScrollTrackGreen;
import controls.Label;
import fl.controls.ScrollBarDirection;
import fl.controls.TileList;
import fl.data.DataProvider;
import fl.events.ListEvent;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.filters.GlowFilter;
import flash.geom.Rectangle;
import flash.system.Capabilities;
import flash.utils.getTimer;
import forms.RegisterForm;
import scpacker.resource.ResourceType;
import scpacker.resource.ResourceUtil;
import scpacker.resource.images.ImageResource;
public class UserGiftsInfoList extends Sprite implements IResourceLoadListener
{
private static const MIN_POSSIBLE_SPEED:Number = 70;
private static const MAX_DELTA_FOR_SELECT:Number = 7;
private static const ADDITIONAL_SCROLL_AREA_HEIGHT:Number = 3;
private var list:TileList;
private var dataProvider:DataProvider;
private var previousPositionX:Number;
private var currentPositionX:Number;
private var sumDragWay:Number;
private var lastItemIndex:int;
private var previousTime:int;
private var currentTime:int;
private var scrollSpeed:Number = 0;
private var _width:int;
private var _height:int;
private var successFunc:Function;
public function UserGiftsInfoList()
{
super();
this.dataProvider = new DataProvider();
this.list = new TileList();
this.list.dataProvider = this.dataProvider;
this.list.rowCount = 1;
this.list.rowHeight = 117;
this.list.columnWidth = 160;
this.list.setStyle("cellRenderer",GiftRollerRenderer);
this.list.direction = ScrollBarDirection.HORIZONTAL;
this.list.focusEnabled = false;
this.list.horizontalScrollBar.focusEnabled = false;
this.list.setStyle("downArrowUpSkin",ScrollArrowDownGreen);
this.list.setStyle("downArrowDownSkin",ScrollArrowDownGreen);
this.list.setStyle("downArrowOverSkin",ScrollArrowDownGreen);
this.list.setStyle("downArrowDisabledSkin",ScrollArrowDownGreen);
this.list.setStyle("upArrowUpSkin",ScrollArrowUpGreen);
this.list.setStyle("upArrowDownSkin",ScrollArrowUpGreen);
this.list.setStyle("upArrowOverSkin",ScrollArrowUpGreen);
this.list.setStyle("upArrowDisabledSkin",ScrollArrowUpGreen);
this.list.setStyle("trackUpSkin",ScrollTrackGreen);
this.list.setStyle("trackDownSkin",ScrollTrackGreen);
this.list.setStyle("trackOverSkin",ScrollTrackGreen);
this.list.setStyle("trackDisabledSkin",ScrollTrackGreen);
this.list.setStyle("thumbUpSkin",ScrollThumbSkinGreen);
this.list.setStyle("thumbDownSkin",ScrollThumbSkinGreen);
this.list.setStyle("thumbOverSkin",ScrollThumbSkinGreen);
this.list.setStyle("thumbDisabledSkin",ScrollThumbSkinGreen);
}
public function initData(items:Array, success:Function) : void
{
var item:UserGiftServerItem = null;
var data:Object = null;
var icon:DisplayObject = null;
var i:int = 0;
this.successFunc = success;
for each(item in items)
{
data = {};
data.id = item.giftid;
data.index = i;
data.rare = item.status;
data.item = item;
data.preview = ResourceUtil.getResource(ResourceType.IMAGE,item.giftid + "_m0_preview");
icon = this.myIcon(data,false);
this.dataProvider.addItem({
"iconNormal":icon,
"iconSelected":icon,
"dat":data,
"accessable":false,
"rang":0,
"type":1,
"typesort":0,
"sort":1
});
i++;
}
addChild(this.list);
addEventListener(Event.ADDED_TO_STAGE,this.addListeners);
addEventListener(Event.REMOVED_FROM_STAGE,this.removeListeners);
}
public function addClickListener(func:Function) : void
{
this.list.addEventListener(ListEvent.ITEM_CLICK,func);
}
private function addListeners(e:Event) : void
{
addEventListener(MouseEvent.MOUSE_WHEEL,this.scrollList);
addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown);
}
private function removeListeners(e:Event) : void
{
removeEventListener(MouseEvent.MOUSE_WHEEL,this.scrollList);
removeEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown);
removeEventListener(Event.ENTER_FRAME,this.onEnterFrame);
stage.removeEventListener(MouseEvent.MOUSE_UP,this.onMouseUp);
stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove);
}
private function scrollList(e:MouseEvent) : void
{
this.list.horizontalScrollPosition -= e.delta * (!!Boolean(Capabilities.os.search("Linux") != -1) ? 50 : 10);
}
private function onMouseDown(e:MouseEvent) : void
{
this.scrollSpeed = 0;
var rect:Rectangle = this.list.horizontalScrollBar.getBounds(stage);
rect.top -= ADDITIONAL_SCROLL_AREA_HEIGHT;
if(!rect.contains(e.stageX,e.stageY))
{
this.sumDragWay = 0;
this.previousPositionX = this.currentPositionX = e.stageX;
this.currentTime = this.previousTime = getTimer();
this.lastItemIndex = this.list.selectedIndex;
stage.addEventListener(MouseEvent.MOUSE_UP,this.onMouseUp);
stage.addEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove);
}
}
private function onMouseUp(e:MouseEvent) : void
{
stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove);
stage.removeEventListener(MouseEvent.MOUSE_UP,this.onMouseUp);
var delta:Number = (getTimer() - this.previousTime) / 1000;
if(delta == 0)
{
delta = 0.1;
}
var deltaX:Number = e.stageX - this.previousPositionX;
this.scrollSpeed = deltaX / delta;
this.previousTime = this.currentTime;
this.currentTime = getTimer();
addEventListener(Event.ENTER_FRAME,this.onEnterFrame);
}
private function onEnterFrame(param1:Event) : void
{
this.previousTime = this.currentTime;
this.currentTime = getTimer();
var dt:Number = (this.currentTime - this.previousTime) / 1000;
this.list.horizontalScrollPosition -= this.scrollSpeed * dt;
var horizontalPos:Number = this.list.horizontalScrollPosition;
var maxHorizontalPos:Number = this.list.maxHorizontalScrollPosition;
if(Math.abs(this.scrollSpeed) > MIN_POSSIBLE_SPEED && 0 < horizontalPos && horizontalPos < maxHorizontalPos)
{
this.scrollSpeed *= Math.exp(-1.5 * dt);
}
else
{
this.scrollSpeed = 0;
removeEventListener(Event.ENTER_FRAME,this.onEnterFrame);
}
}
private function onMouseMove(e:MouseEvent) : void
{
this.previousPositionX = this.currentPositionX;
this.currentPositionX = e.stageX;
this.previousTime = this.currentTime;
this.currentTime = getTimer();
var deltaX:Number = this.currentPositionX - this.previousPositionX;
this.sumDragWay += Math.abs(deltaX);
if(this.sumDragWay > MAX_DELTA_FOR_SELECT)
{
this.list.horizontalScrollPosition -= deltaX;
}
e.updateAfterEvent();
}
public function resourceLoaded(resource:Object) : void
{
var item:Object = null;
for(var i:int = 0; i < this.dataProvider.length; i++)
{
item = this.dataProvider.getItemAt(i);
if(resource.id.split("_m0_preview")[0] == item.dat.id)
{
this.update(item.dat.index,"preview",resource as ImageResource);
if(item.dat.index == 0)
{
this.successFunc(item.dat);
}
}
}
}
private function itemByIndex(id:Object, searchInSilent:Boolean = false) : int
{
var obj:Object = null;
for(var i:int = 0; i < this.dataProvider.length; i++)
{
obj = this.dataProvider.getItemAt(i);
if(obj.dat.index == i)
{
return i;
}
}
return -1;
}
public function update(index:int, param:String, value:* = null) : void
{
var iNormal:DisplayObject = null;
var iSelected:DisplayObject = null;
var obj:Object = this.dataProvider.getItemAt(index);
var data:Object = obj.dat;
data[param] = value;
iNormal = this.myIcon(data,false);
iSelected = this.myIcon(data,true);
obj.dat = data;
obj.iconNormal = iNormal;
obj.iconSelected = iSelected;
this.dataProvider.replaceItemAt(obj,index);
this.dataProvider.invalidateItemAt(index);
}
public function resourceUnloaded(resourceId:Long) : void
{
}
private function myIcon(param1:Object, param2:Boolean) : DisplayObject
{
var _loc5_:BitmapData = null;
var _loc6_:ImageResource = null;
var _loc8_:uint = 0;
var _loc10_:Bitmap = null;
var _loc3_:Sprite = new Sprite();
var _loc4_:Sprite = new Sprite();
_loc6_ = param1.preview;
var _loc7_:Bitmap = new Bitmap(ItemGiftBackgrounds.getBG(UserGiftsRare.getRare(param1.rare)));
_loc7_.x = 2;
_loc7_.y = 4;
_loc8_ = ItemGiftBackgrounds.getColor(param1.rare);
_loc4_.addChildAt(_loc7_,0);
var _loc9_:InputCheckIcon = new InputCheckIcon();
_loc6_ = param1.preview;
if(_loc6_ == null)
{
_loc4_.addChild(_loc9_);
_loc9_.x = 130 - _loc9_.width >> 1;
_loc9_.y = 93 - _loc9_.height >> 1;
_loc9_.gotoAndStop(RegisterForm.CALLSIGN_STATE_INVALID);
}
else if(_loc6_.loaded())
{
_loc10_ = new Bitmap(_loc6_.bitmapData as BitmapData);
_loc10_.width *= 0.85;
_loc10_.height *= 0.85;
_loc10_.x = 13;
_loc10_.y = 18;
_loc4_.addChild(_loc10_);
if(param1.index == 0)
{
this.successFunc(param1);
}
}
else if(_loc6_ != null && !_loc6_.loaded())
{
_loc4_.addChild(_loc9_);
_loc9_.x = 134 - _loc9_.width >> 1;
_loc9_.y = 97 - _loc9_.height >> 1;
_loc9_.gotoAndStop(RegisterForm.CALLSIGN_STATE_PROGRESS);
_loc6_.completeLoadListener = this;
_loc6_.load();
}
_loc5_ = new BitmapData(_loc4_.width + 5,_loc4_.height + 5,true,0);
_loc5_.draw(_loc4_);
_loc3_.addChildAt(new Bitmap(_loc5_),0);
return _loc3_;
}
override public function set width(value:Number) : void
{
this._width = int(value);
this.list.width = this._width;
}
override public function get width() : Number
{
return this._width;
}
override public function set height(value:Number) : void
{
this._height = int(value);
this.list.height = this._height;
}
override public function get height() : Number
{
return this._height;
}
}
}
|
package projects.tanks.client.battlefield.models.user.resistance {
public interface ITankResistancesModelBase {
}
}
|
package alternativa.tanks.model.garage.present {
import alternativa.types.Long;
[ModelInterface]
public interface PresentGiven {
function removePresent(param1:Long) : void;
}
}
|
package alternativa.tanks.models.weapon.freeze
{
import com.reygazu.anticheat.variables.SecureInt;
public class FreezeData
{
private static var i:int = 0;
public var damageAreaConeAngle:Number;
public var damageAreaRange:Number;
public var energyCapacity:int;
public var energyDischargeSpeed:int;
public var energyRechargeSpeed:int;
public var weaponTickMsec:SecureInt;
public function FreezeData(damageAreaConeAngle:Number, damageAreaRange:Number, energyCapacity:int, energyDischargeSpeed:int, energyRechargeSpeed:int, weaponTickMsec:int)
{
this.weaponTickMsec = new SecureInt("WeaponTickMsec" + i,0);
super();
this.damageAreaConeAngle = damageAreaConeAngle;
this.damageAreaRange = damageAreaRange;
this.energyCapacity = energyCapacity;
this.energyDischargeSpeed = energyDischargeSpeed;
this.energyRechargeSpeed = energyRechargeSpeed;
this.weaponTickMsec.value = weaponTickMsec;
++i;
}
}
}
|
package alternativa.tanks.model.news
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class NewsIcons_crystall extends BitmapAsset
{
public function NewsIcons_crystall()
{
super();
}
}
}
|
package projects.tanks.client.partners.impl.facebook.login {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
public class FacebookInternalLoginModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:FacebookInternalLoginModelServer;
private var client:IFacebookInternalLoginModelBase = IFacebookInternalLoginModelBase(this);
private var modelId:Long = Long.getLong(1312719709,-729411475);
public function FacebookInternalLoginModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new FacebookInternalLoginModelServer(IModel(this));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package forms.friends.button.friends
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RequestCountIndicator_leftIconClass extends BitmapAsset
{
public function RequestCountIndicator_leftIconClass()
{
super();
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.weapon.ricochet {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
import projects.tanks.client.battlefield.models.tankparts.weapon.ricochet.RicochetCC;
public class CodecRicochetCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_energyCapacity:ICodec;
private var codec_energyPerShot:ICodec;
private var codec_energyRechargeSpeed:ICodec;
private var codec_maxRicochetCount:ICodec;
private var codec_shellRadius:ICodec;
private var codec_shellSpeed:ICodec;
private var codec_shotDistance:ICodec;
public function CodecRicochetCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_energyCapacity = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_energyPerShot = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_energyRechargeSpeed = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_maxRicochetCount = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_shellRadius = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_shellSpeed = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_shotDistance = param1.getCodec(new TypeCodecInfo(Float,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:RicochetCC = new RicochetCC();
local2.energyCapacity = this.codec_energyCapacity.decode(param1) as Number;
local2.energyPerShot = this.codec_energyPerShot.decode(param1) as Number;
local2.energyRechargeSpeed = this.codec_energyRechargeSpeed.decode(param1) as Number;
local2.maxRicochetCount = this.codec_maxRicochetCount.decode(param1) as int;
local2.shellRadius = this.codec_shellRadius.decode(param1) as Number;
local2.shellSpeed = this.codec_shellSpeed.decode(param1) as Number;
local2.shotDistance = this.codec_shotDistance.decode(param1) as Number;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:RicochetCC = RicochetCC(param2);
this.codec_energyCapacity.encode(param1,local3.energyCapacity);
this.codec_energyPerShot.encode(param1,local3.energyPerShot);
this.codec_energyRechargeSpeed.encode(param1,local3.energyRechargeSpeed);
this.codec_maxRicochetCount.encode(param1,local3.maxRicochetCount);
this.codec_shellRadius.encode(param1,local3.shellRadius);
this.codec_shellSpeed.encode(param1,local3.shellSpeed);
this.codec_shotDistance.encode(param1,local3.shotDistance);
}
}
}
|
package alternativa.tanks.model.payment.shop.specialkit.view {
import alternativa.tanks.gui.shop.shopitems.item.base.ShopButton;
import alternativa.tanks.gui.shop.shopitems.item.kits.singleitem.SingleKitButton;
import alternativa.tanks.model.payment.shop.ShopItemView;
import projects.tanks.client.panel.model.shop.specialkit.view.singleitem.ISingleItemKitViewModelBase;
import projects.tanks.client.panel.model.shop.specialkit.view.singleitem.SingleItemKitViewModelBase;
[ModelInfo]
public class SingleItemKitViewModel extends SingleItemKitViewModelBase implements ISingleItemKitViewModelBase, ShopItemView {
public function SingleItemKitViewModel() {
super();
}
public function getButtonView() : ShopButton {
return new SingleKitButton(object,getInitParam());
}
}
}
|
package _codec.projects.tanks.client.panel.model.abonements {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.abonements.ShopAbonementData;
import projects.tanks.client.panel.model.abonements.UserAbonementsCC;
public class CodecUserAbonementsCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_abonementDataList:ICodec;
public function CodecUserAbonementsCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_abonementDataList = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(ShopAbonementData,false),false,1));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:UserAbonementsCC = new UserAbonementsCC();
local2.abonementDataList = this.codec_abonementDataList.decode(param1) as Vector.<ShopAbonementData>;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:UserAbonementsCC = UserAbonementsCC(param2);
this.codec_abonementDataList.encode(param1,local3.abonementDataList);
}
}
}
|
package alternativa.tanks.model.matchmaking.spectator {
import alternativa.tanks.service.battlelist.MatchmakingEvent;
import alternativa.tanks.service.matchmaking.MatchmakingFormService;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.battleselect.model.matchmaking.spectator.IMatchmakingSpectatorEntranceModelBase;
import projects.tanks.client.battleselect.model.matchmaking.spectator.MatchmakingSpectatorEntranceModelBase;
import projects.tanks.clients.fp10.libraries.tanksservices.service.alertservices.IAlertService;
[ModelInfo]
public class MatchmakingSpectatorEntranceModel extends MatchmakingSpectatorEntranceModelBase implements IMatchmakingSpectatorEntranceModelBase, ObjectLoadListener, ObjectUnloadListener {
[Inject]
public static var matchmakingFormService:MatchmakingFormService;
[Inject]
public static var alertService:IAlertService;
public function MatchmakingSpectatorEntranceModel() {
super();
}
private function onEnter(param1:MatchmakingEvent) : * {
server.enter(param1.getMode());
}
public function objectLoaded() : void {
matchmakingFormService.addEventListener(MatchmakingEvent.ENTER_AS_SPECTATOR,getFunctionWrapper(this.onEnter));
}
public function objectUnloaded() : void {
matchmakingFormService.removeEventListener(MatchmakingEvent.ENTER_AS_SPECTATOR,getFunctionWrapper(this.onEnter));
}
public function enterFailedNoSuitableBattles() : void {
alertService.showOkAlert("There are no suitable battles");
}
}
}
|
package alternativa.tanks.models.weapon.shaft {
[ModelInterface]
public interface IShaftSFXModel {
function getEffects() : ShaftEffects;
}
}
|
package _codec.projects.tanks.client.garage.models.item.delaymount {
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.garage.models.item.delaymount.DelayMountCategoryCC;
public class CodecDelayMountCategoryCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_delayMountArmorInSec:ICodec;
private var codec_delayMountDroneInSec:ICodec;
private var codec_delayMountResistanceInSec:ICodec;
private var codec_delayMountWeaponInSec:ICodec;
public function CodecDelayMountCategoryCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_delayMountArmorInSec = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_delayMountDroneInSec = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_delayMountResistanceInSec = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_delayMountWeaponInSec = param1.getCodec(new TypeCodecInfo(int,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:DelayMountCategoryCC = new DelayMountCategoryCC();
local2.delayMountArmorInSec = this.codec_delayMountArmorInSec.decode(param1) as int;
local2.delayMountDroneInSec = this.codec_delayMountDroneInSec.decode(param1) as int;
local2.delayMountResistanceInSec = this.codec_delayMountResistanceInSec.decode(param1) as int;
local2.delayMountWeaponInSec = this.codec_delayMountWeaponInSec.decode(param1) as int;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:DelayMountCategoryCC = DelayMountCategoryCC(param2);
this.codec_delayMountArmorInSec.encode(param1,local3.delayMountArmorInSec);
this.codec_delayMountDroneInSec.encode(param1,local3.delayMountDroneInSec);
this.codec_delayMountResistanceInSec.encode(param1,local3.delayMountResistanceInSec);
this.codec_delayMountWeaponInSec.encode(param1,local3.delayMountWeaponInSec);
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.twins {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Byte;
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.types.Vector3d;
public class TwinsModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:TwinsModelServer;
private var client:ITwinsModelBase = ITwinsModelBase(this);
private var modelId:Long = Long.getLong(1952266263,-1912192267);
private var _fireId:Long = Long.getLong(823399156,351343872);
private var _fire_shooterCodec:ICodec;
private var _fire_barrelCodec:ICodec;
private var _fire_shotIdCodec:ICodec;
private var _fire_shotDirectionCodec:ICodec;
private var _fireDummyId:Long = Long.getLong(1289133603,-862527368);
private var _fireDummy_shooterCodec:ICodec;
private var _fireDummy_barrelCodec:ICodec;
public function TwinsModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new TwinsModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(TwinsCC,false)));
this._fire_shooterCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._fire_barrelCodec = this._protocol.getCodec(new TypeCodecInfo(Byte,false));
this._fire_shotIdCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._fire_shotDirectionCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._fireDummy_shooterCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._fireDummy_barrelCodec = this._protocol.getCodec(new TypeCodecInfo(Byte,false));
}
protected function getInitParam() : TwinsCC {
return TwinsCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._fireId:
this.client.fire(IGameObject(this._fire_shooterCodec.decode(param2)),int(this._fire_barrelCodec.decode(param2)),int(this._fire_shotIdCodec.decode(param2)),Vector3d(this._fire_shotDirectionCodec.decode(param2)));
break;
case this._fireDummyId:
this.client.fireDummy(IGameObject(this._fireDummy_shooterCodec.decode(param2)),int(this._fireDummy_barrelCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.gui.clanmanagement.clanmemberlist.candidates {
import alternativa.tanks.gui.clanmanagement.clanmemberlist.list.ClanUserItem;
import alternativa.tanks.gui.clanmanagement.clanmemberlist.list.DeleteIndicator;
import alternativa.tanks.models.service.ClanService;
import alternativa.tanks.service.clan.ClanMembersListEvent;
import alternativa.types.Long;
import flash.events.Event;
import flash.events.MouseEvent;
public class ClanOutgoingRequestsItem extends ClanUserItem {
[Inject]
public static var clanService:ClanService;
public function ClanOutgoingRequestsItem(param1:Long) {
super();
userContainer = createUserLabel(param1);
addChild(userContainer);
_deleteIndicator = new DeleteIndicator(false);
addChild(_deleteIndicator);
_deleteIndicator.visible = false;
_deleteIndicator.addEventListener(MouseEvent.CLICK,this.onClickDelete,false,0,true);
this.onResize();
}
private function onClickDelete(param1:MouseEvent) : void {
dispatchEvent(new ClanMembersListEvent(ClanMembersListEvent.REVOKE_USER,_userLabel.userId,_userLabel.uid,true,true));
}
override protected function onResize(param1:Event = null) : void {
userContainer.x = MARGIN;
userContainer.y = 1;
userContainer.width = width - 2 * MARGIN;
_deleteIndicator.x = width - _deleteIndicator.width - 6;
_deleteIndicator.y = 1;
redrawBackground();
}
}
}
|
package projects.tanks.client.panel.model.quest.daily.type.bonus {
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 BonusCatchDailyQuestModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function BonusCatchDailyQuestModelServer(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.service.device {
import flash.events.Event;
public class UpdateDevicesEvent extends Event {
public static const EVENT:String = "UpdateDevicesEvent";
public function UpdateDevicesEvent() {
super(EVENT);
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.gearscore {
public class BattleGearScoreCC {
private var _score:int;
public function BattleGearScoreCC(param1:int = 0) {
super();
this._score = param1;
}
public function get score() : int {
return this._score;
}
public function set score(param1:int) : void {
this._score = param1;
}
public function toString() : String {
var local1:String = "BattleGearScoreCC [";
local1 += "score = " + this.score + " ";
return local1 + "]";
}
}
}
|
package projects.tanks.client.garage.models.item.delaymount {
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 DelayMountCategoryModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function DelayMountCategoryModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.model.payment.modes.alipay {
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.gui.shop.forms.GoToUrlForm;
import alternativa.tanks.model.payment.category.PayModeView;
import alternativa.tanks.model.payment.modes.PayUrl;
import alternativa.tanks.model.payment.modes.asyncurl.AsyncUrlPayMode;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowService;
import alternativa.types.Long;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.panel.model.payment.modes.alipay.AlipayPaymentModelBase;
import projects.tanks.client.panel.model.payment.modes.alipay.IAlipayPaymentModelBase;
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
[ModelInfo]
public class AlipayPaymentModel extends AlipayPaymentModelBase implements IAlipayPaymentModelBase, AsyncUrlPayMode, ObjectLoadListener, PayModeView, ObjectUnloadListener {
[Inject]
public static var paymentWindowService:PaymentWindowService;
public function AlipayPaymentModel() {
super();
}
public function requestAsyncUrl() : void {
var local1:Long = paymentWindowService.getChosenItem().id;
server.getPaymentUrl(local1);
}
public function receiveUrl(param1:PaymentRequestUrl) : void {
PayUrl(object.adapt(PayUrl)).forceGoToUrl(param1);
}
public function objectLoaded() : void {
putData(PayModeForm,new GoToUrlForm(object));
}
public function getView() : PayModeForm {
return PayModeForm(getData(PayModeForm));
}
public function objectUnloaded() : void {
this.getView().destroy();
clearData(PayModeForm);
}
}
}
|
package alternativa.startup {
import flash.display.Sprite;
import flash.system.Capabilities;
public class StartupSettings {
public static var preLauncher:Sprite;
public function StartupSettings() {
super();
}
public static function closeApplication() : void {
if(preLauncher != null) {
preLauncher["closeLauncher"]();
}
}
public static function isUserFromTutorial() : Boolean {
if(preLauncher != null) {
return preLauncher["isUserFromTutorial"]();
}
return false;
}
public static function get isDesktop() : Boolean {
return Capabilities.playerType == "Desktop" || Capabilities.playerType == "External";
}
}
}
|
package projects.tanks.client.battlefield.models.bonus.bonus.battlebonuses.crystal {
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 BattleGoldBonusesModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function BattleGoldBonusesModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.models.battle.gui.inventory {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.inventory.HudInventoryIcon_overdriveTitanIconClass.png")]
public class HudInventoryIcon_overdriveTitanIconClass extends BitmapAsset {
public function HudInventoryIcon_overdriveTitanIconClass() {
super();
}
}
}
|
package alternativa.proplib.objects {
import alternativa.engine3d.core.Clipping;
import alternativa.engine3d.core.Sorting;
import alternativa.engine3d.objects.Mesh;
public class Polygon extends Mesh {
public function Polygon(vertices:Vector.<Number>, uv:Vector.<Number>, twoSided:Boolean) {
super();
var numVertices:int = vertices.length / 3;
var indices:Vector.<int> = new Vector.<int>(numVertices + 1);
indices[0] = numVertices;
for(var i:int = 0; i < numVertices; i++) {
indices[i + 1] = i;
}
addVerticesAndFaces(vertices,uv,indices,true);
if(twoSided) {
}
calculateFacesNormals();
calculateBounds();
sorting = Sorting.DYNAMIC_BSP;
clipping = Clipping.FACE_CLIPPING;
}
}
}
|
package alternativa.tanks.models.battlefield.effects.graffiti
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class GraffitiMenu_windowBitmap extends BitmapAsset
{
public function GraffitiMenu_windowBitmap()
{
super();
}
}
}
|
package projects.tanks.clients.fp10.Prelauncher.makeup {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/projects.tanks.clients.fp10.Prelauncher.makeup.MakeUp_helpActiveIconMakeUp.png")]
public class MakeUp_helpActiveIconMakeUp extends BitmapAsset {
public function MakeUp_helpActiveIconMakeUp() {
super();
}
}
}
|
package alternativa.tanks.models.weapon.artillery {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IArtilleryModelAdapt implements IArtilleryModel {
private var object:IGameObject;
private var impl:IArtilleryModel;
public function IArtilleryModelAdapt(param1:IGameObject, param2:IArtilleryModel) {
super();
this.object = param1;
this.impl = param2;
}
public function getDefaultElevation() : Number {
var result:Number = NaN;
try {
Model.object = this.object;
result = Number(this.impl.getDefaultElevation());
}
finally {
Model.popObject();
}
return result;
}
public function getWeapon() : ArtilleryWeapon {
var result:ArtilleryWeapon = null;
try {
Model.object = this.object;
result = this.impl.getWeapon();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.model.payment.shop.shopabonement {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ShopAbonementsAdapt implements ShopAbonements {
private var object:IGameObject;
private var impl:ShopAbonements;
public function ShopAbonementsAdapt(param1:IGameObject, param2:ShopAbonements) {
super();
this.object = param1;
this.impl = param2;
}
public function getCategoriesWithBonus() : Vector.<IGameObject> {
var result:Vector.<IGameObject> = null;
try {
Model.object = this.object;
result = this.impl.getCategoriesWithBonus();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package platform.client.fp10.core.network {
public interface ICommandSender {
function sendCommand(param1:Object) : void;
}
}
|
package projects.tanks.client.battlefield.models.mapbonuslight {
import projects.tanks.client.battlefield.models.coloradjust.ColorAdjustParams;
public class MapBonusLightCC {
private var _bonusLightIntensity:Number;
private var _hwColorAdjust:ColorAdjustParams;
private var _softColorAdjust:ColorAdjustParams;
public function MapBonusLightCC(param1:Number = 0, param2:ColorAdjustParams = null, param3:ColorAdjustParams = null) {
super();
this._bonusLightIntensity = param1;
this._hwColorAdjust = param2;
this._softColorAdjust = param3;
}
public function get bonusLightIntensity() : Number {
return this._bonusLightIntensity;
}
public function set bonusLightIntensity(param1:Number) : void {
this._bonusLightIntensity = param1;
}
public function get hwColorAdjust() : ColorAdjustParams {
return this._hwColorAdjust;
}
public function set hwColorAdjust(param1:ColorAdjustParams) : void {
this._hwColorAdjust = param1;
}
public function get softColorAdjust() : ColorAdjustParams {
return this._softColorAdjust;
}
public function set softColorAdjust(param1:ColorAdjustParams) : void {
this._softColorAdjust = param1;
}
public function toString() : String {
var local1:String = "MapBonusLightCC [";
local1 += "bonusLightIntensity = " + this.bonusLightIntensity + " ";
local1 += "hwColorAdjust = " + this.hwColorAdjust + " ";
local1 += "softColorAdjust = " + this.softColorAdjust + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.tank.ultimate.mammoth {
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.math.Vector3;
import alternativa.tanks.battle.scene3d.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.sfx.GraphicEffect;
import alternativa.tanks.sfx.Sound3D;
import alternativa.tanks.utils.objectpool.Pool;
import alternativa.tanks.utils.objectpool.PooledObject;
import flash.display.BlendMode;
import flash.geom.Vector3D;
public class FieldEffect extends PooledObject implements GraphicEffect {
private static const SHINE_SIZE:int = 600;
public static const SHINE_OFFSET:Number = 300;
private static const HEART_SIZE:int = 250;
public static const HEART_OFFSET:Number = 400;
public static const FADE:Number = 0.5;
public static const MIN:Number = 0.3;
public static const HALF:Number = (1 - MIN) / 2;
public static const LOOP_TIME_START:Number = 0.5;
private static const vector:Vector3D = new Vector3D();
private static const vector3:Vector3 = new Vector3();
private var container:Scene3DContainer;
private var target:Object3D;
private var shine1:Sprite3D;
private var shine2:Sprite3D;
private var heart:Sprite3D;
private var time:Number;
private var fadeOutTime:Number;
private var fadeOut:Boolean;
private var startSound:Sound3D;
private var loopSound:Sound3D;
private var stopSound:Sound3D;
private var startSoundPlayed:Boolean = false;
private var loopSoundPlayed:Boolean = false;
public function FieldEffect(param1:Pool) {
super(param1);
this.shine1 = new Sprite3D(SHINE_SIZE,SHINE_SIZE);
this.shine2 = new Sprite3D(SHINE_SIZE,SHINE_SIZE);
this.heart = new Sprite3D(HEART_SIZE,HEART_SIZE);
this.shine1.useLight = false;
this.shine1.useShadowMap = false;
this.shine1.blendMode = BlendMode.ADD;
this.shine1.softAttenuation = 200;
this.shine2.useLight = false;
this.shine2.useShadowMap = false;
this.shine2.blendMode = BlendMode.ADD;
this.shine2.rotation = Math.PI;
this.shine2.softAttenuation = 200;
this.heart.useLight = false;
this.heart.useShadowMap = false;
this.heart.blendMode = BlendMode.ADD;
this.heart.softAttenuation = 200;
}
public function init(param1:TextureMaterial, param2:TextureMaterial, param3:Object3D, param4:Sound3D, param5:Sound3D, param6:Sound3D) : void {
this.target = param3;
this.startSound = param4;
this.loopSound = param5;
this.stopSound = param6;
this.shine1.material = param1;
this.shine2.material = param1;
this.heart.material = param2;
this.shine2.scaleX = MIN + HALF;
this.shine2.scaleY = MIN + HALF;
this.shine2.scaleZ = MIN + HALF;
this.time = 0;
this.fadeOutTime = 0;
this.fadeOut = false;
}
public function addedToScene(param1:Scene3DContainer) : void {
this.container = param1;
param1.addChild(this.shine1);
param1.addChild(this.shine2);
param1.addChild(this.heart);
this.startSoundPlayed = false;
this.loopSoundPlayed = false;
}
public function play(param1:int, param2:GameCamera) : Boolean {
var local6:Number = NaN;
var local3:Number = param1 / 1000;
this.time += local3;
this.playSounds(param2);
vector.x = param2.x - this.target.x;
vector.y = param2.y - this.target.y;
vector.z = param2.z - this.target.z + 50;
vector.normalize();
this.shine1.x = this.target.x + vector.x * SHINE_OFFSET;
this.shine1.y = this.target.y + vector.y * SHINE_OFFSET;
this.shine1.z = this.target.z + vector.z * SHINE_OFFSET + 50;
this.shine2.x = this.shine1.x;
this.shine2.y = this.shine1.y;
this.shine2.z = this.shine1.z;
this.heart.x = this.target.x + vector.x * HEART_OFFSET;
this.heart.y = this.target.y + vector.y * HEART_OFFSET;
this.heart.z = this.target.z + vector.z * HEART_OFFSET + 50;
var local4:Number = local3 * 0.75;
var local5:Number = this.shine1.scaleX + local4;
if(local5 > 1) {
local5 = MIN;
}
this.shine1.scaleX = local5;
this.shine1.scaleY = local5;
this.shine1.scaleZ = local5;
this.shine1.alpha = 1 - Math.abs(MIN + HALF - local5) / HALF;
this.shine1.alpha = Math.sqrt(this.shine1.alpha);
local5 = this.shine2.scaleX + local4;
if(local5 > 1) {
local5 = MIN;
}
this.shine2.scaleX = local5;
this.shine2.scaleY = local5;
this.shine2.scaleZ = local5;
this.shine2.alpha = 1 - Math.abs(MIN + HALF - local5) / HALF;
this.shine2.alpha = Math.sqrt(this.shine2.alpha);
local5 = 0.9 + Math.sin(this.time * 8) / 10;
this.heart.scaleX = local5;
this.heart.scaleY = local5;
this.heart.scaleZ = local5;
this.heart.alpha = local5;
if(this.heart.alpha > 1) {
this.heart.alpha = 1;
}
if(this.fadeOut) {
this.fadeOutTime += local3;
local6 = (FADE - this.fadeOutTime) / FADE;
this.shine1.alpha *= local6;
this.shine2.alpha *= local6;
this.heart.alpha *= local6;
return local6 > 0;
}
if(this.time <= FADE) {
local6 = this.time / FADE;
this.shine1.alpha *= local6;
this.shine2.alpha *= local6;
this.heart.alpha *= local6;
return true;
}
local6 = 1;
this.shine1.alpha *= local6;
this.shine2.alpha *= local6;
this.heart.alpha *= local6;
return true;
}
private function playSounds(param1:GameCamera) : void {
vector3.reset(this.target.x,this.target.y,this.target.z);
if(!this.startSoundPlayed) {
this.startSound.play(0,0);
this.startSound.checkVolume(param1.position,vector3,param1.xAxis);
this.startSoundPlayed = true;
}
if(this.time >= LOOP_TIME_START) {
if(!this.loopSoundPlayed) {
this.loopSound.play(0,100000);
this.loopSoundPlayed = true;
}
this.loopSound.checkVolume(param1.position,vector3,param1.xAxis);
}
this.stopSound.checkVolume(param1.position,vector3,param1.xAxis);
}
public function stop(param1:Boolean) : void {
this.startSound.stop();
this.loopSound.stop();
if(param1) {
this.stopSound.play(0,0);
}
this.fadeOut = true;
}
public function destroy() : void {
this.container.removeChild(this.shine1);
this.container.removeChild(this.shine2);
this.container.removeChild(this.heart);
this.startSound.stop();
this.loopSound.stop();
this.stopSound.stop();
this.startSound = null;
this.loopSound = null;
this.stopSound = null;
this.shine1.material = null;
this.shine2.material = null;
this.heart.material = null;
this.container = null;
this.target = null;
recycle();
}
public function kill() : void {
this.shine1.alpha = 0;
this.shine2.alpha = 0;
this.heart.alpha = 0;
}
}
}
|
package alternativa.tanks.gui
{
import flash.events.Event;
public class PaymentWindowEvent extends Event
{
public static const SELECT_COUNTRY:String = "PaymentWindowEventSelectCountry";
public static const SELECT_OPERATOR:String = "PaymentWindowEventSelectOperator";
public static const CLOSE:String = "PaymentWindowEventClose";
public function PaymentWindowEvent(type:String)
{
super(type,true,false);
}
}
}
|
package _codec.projects.tanks.client.panel.model.shop.goldboxpackage {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.shop.goldboxpackage.GoldBoxPackageCC;
public class VectorCodecGoldBoxPackageCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecGoldBoxPackageCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(GoldBoxPackageCC,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.<GoldBoxPackageCC> = new Vector.<GoldBoxPackageCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = GoldBoxPackageCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:GoldBoxPackageCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<GoldBoxPackageCC> = Vector.<GoldBoxPackageCC>(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.components.helpers {
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.events.MouseEvent;
import flash.geom.Point;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.BubbleHelper;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.HelperAlign;
public class BubbleItem extends BubbleHelper {
private static var instance:BubbleItem;
public function BubbleItem() {
super();
addEventListener(MouseEvent.CLICK,this.onMouseClick);
}
public static function createBubble(param1:String, param2:DisplayObject, param3:DisplayObjectContainer) : BubbleItem {
if(instance == null) {
instance = new BubbleItem();
}
instance.text = param1;
instance.arrowLehgth = 20;
instance.arrowAlign = HelperAlign.BOTTOM_LEFT;
instance.x = param2.x;
instance.y = param2.y - 45;
instance.targetPoint = new Point(param2.x,20);
instance.draw(instance.size);
param3.addChild(instance);
return instance;
}
public static function hide() : void {
if(instance != null) {
instance.hide();
}
}
private function onMouseClick(param1:MouseEvent) : void {
this.hide();
}
private function hide() : void {
if(Boolean(parent)) {
parent.removeChild(this);
}
}
}
}
|
package alternativa.tanks.models.weapon.railgun
{
import alternativa.math.Matrix3;
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.physics.collision.ICollisionDetector;
import alternativa.physics.collision.types.RayIntersection;
import alternativa.tanks.models.ctf.ICTFModel;
import alternativa.tanks.models.tank.TankData;
import flash.utils.Dictionary;
import projects.tanks.client.battleservice.model.team.BattleTeamType;
public class RailgunTargetSystem
{
private static const FLAG_CARRIER_BONUS:Number = 10;
private static const DISTANCE_WEIGHT:Number = 0.65;
private static const BASE_DISTANCE:Number = 20000;
private static const MAX_PRIORITY:Number = 1000;
private const COLLISION_GROUP:int = 16;
private const MAX_RAY_LENGTH:Number = 1.0E10;
private var collisionDetector:ICollisionDetector;
private var upAngleStep:Number;
private var upRaysNum:int;
private var downAngleStep:Number;
private var downRaysNum:int;
private var weakeningCoeff:Number;
private var multybodyPredicate:MultybodyCollisionPredicate;
private var intersection:RayIntersection;
private var dir:Vector3;
private var rotationMatrix:Matrix3;
private var origin:Vector3;
private var _v:Vector3;
private var bestDirectionIndex:int;
private var maxDirectionPriority:Number;
private var bestEffectivity:Number;
private var currTargets:Array;
private var currHitPoints:Array;
private var ctfModel:ICTFModel;
private var maxAngle:Number;
public function RailgunTargetSystem()
{
this.multybodyPredicate = new MultybodyCollisionPredicate();
this.intersection = new RayIntersection();
this.dir = new Vector3();
this.rotationMatrix = new Matrix3();
this.origin = new Vector3();
this._v = new Vector3();
this.currTargets = [];
this.currHitPoints = [];
super();
}
public function setParams(collisionDetector:ICollisionDetector, upAngle:Number, upRaysNum:int, downAngle:Number, downRaysNum:int, weakeningCoeff:Number, ctfModel:ICTFModel) : void
{
this.collisionDetector = collisionDetector;
this.upAngleStep = upAngle / upRaysNum;
this.upRaysNum = upRaysNum;
this.downAngleStep = downAngle / downRaysNum;
this.downRaysNum = downRaysNum;
this.weakeningCoeff = weakeningCoeff;
this.ctfModel = ctfModel;
this.maxAngle = upAngle > downAngle ? Number(upAngle) : Number(downAngle);
}
public function getTargets(shooterData:TankData, barrelOrigin:Vector3, baseDir:Vector3, rotationAxis:Vector3, tanks:Dictionary, shotResult:RailgunShotResult) : void
{
shotResult.targets.length = 0;
shotResult.hitPoints.length = 0;
this.bestEffectivity = 0;
this.bestDirectionIndex = 10000;
this.maxDirectionPriority = 0;
this.checkAllDirections(shooterData,barrelOrigin,baseDir,rotationAxis,tanks,shotResult);
if(this.bestEffectivity == 0)
{
this.collectTargetsAlongRay(shooterData,barrelOrigin,baseDir,tanks,shotResult);
}
this.multybodyPredicate.bodies = null;
this.currHitPoints.length = 0;
this.currTargets.length = 0;
}
private function checkAllDirections(shooterData:TankData, barrelOrigin:Vector3, baseDir:Vector3, rotationAxis:Vector3, tanks:Dictionary, shotResult:RailgunShotResult) : void
{
var i:int = 0;
this.checkDirection(barrelOrigin,baseDir,0,0,shooterData,tanks,shotResult);
this.rotationMatrix.fromAxisAngle(rotationAxis,this.upAngleStep);
this.dir.vCopy(baseDir);
var angle:Number = 0;
for(i = 1; i <= this.upRaysNum; i++)
{
angle += this.upAngleStep;
this.dir.vTransformBy3(this.rotationMatrix);
this.checkDirection(barrelOrigin,this.dir,angle,i,shooterData,tanks,shotResult);
}
this.rotationMatrix.fromAxisAngle(rotationAxis,-this.downAngleStep);
this.dir.vCopy(baseDir);
angle = 0;
for(i = 1; i <= this.downRaysNum; i++)
{
angle += this.downAngleStep;
this.dir.vTransformBy3(this.rotationMatrix);
this.checkDirection(barrelOrigin,this.dir,angle,i,shooterData,tanks,shotResult);
}
}
private function checkDirection(barrelOrigin:Vector3, barrelDir:Vector3, angle:Number, dirIndex:int, shooterData:TankData, tanks:Dictionary, shotResult:RailgunShotResult) : void
{
var distance:Number = NaN;
var directionPriority:Number = NaN;
var len:int = 0;
var i:int = 0;
this.currTargets.length = 0;
this.currHitPoints.length = 0;
var effectivity:Number = this.evaluateDirection(barrelOrigin,barrelDir,shooterData,tanks,this.currTargets,this.currHitPoints);
if(effectivity > 0)
{
distance = this._v.vDiff(this.currHitPoints[0],barrelOrigin).vLength();
directionPriority = this.getDirectionPriority(angle,distance);
if(effectivity > this.bestEffectivity || effectivity == this.bestEffectivity && directionPriority > this.maxDirectionPriority)
{
this.bestEffectivity = effectivity;
this.bestDirectionIndex = dirIndex;
this.maxDirectionPriority = directionPriority;
shotResult.dir.vCopy(barrelDir);
len = this.currTargets.length;
for(i = 0; i < len; i++)
{
shotResult.targets[i] = this.currTargets[i];
shotResult.hitPoints[i] = this.currHitPoints[i];
}
shotResult.targets.length = len;
if(this.currHitPoints.length > len)
{
shotResult.hitPoints[len] = this.currHitPoints[len];
shotResult.hitPoints.length = len + 1;
}
else
{
shotResult.hitPoints.length = len;
}
}
}
}
private function evaluateDirection(barrelOrigin:Vector3, barrelDir:Vector3, shooterData:TankData, tanks:Dictionary, targets:Array, hitPoints:Array) : Number
{
var body:Body = null;
var targetData:TankData = null;
var targetIsEnemy:Boolean = false;
this.multybodyPredicate.bodies = new Dictionary();
this.multybodyPredicate.bodies[shooterData.tank] = true;
this.origin.vCopy(barrelOrigin);
var effectivity:Number = 0;
var effectivityCoeff:Number = 1;
var firstTarget:Boolean = true;
while(this.collisionDetector.intersectRay(this.origin,barrelDir,this.COLLISION_GROUP,this.MAX_RAY_LENGTH,this.multybodyPredicate,this.intersection))
{
body = this.intersection.primitive.body;
if(body == null)
{
hitPoints.push(this.intersection.pos.vClone());
break;
}
targetData = tanks[body];
if(targetData != null)
{
targetIsEnemy = shooterData.teamType == BattleTeamType.NONE || shooterData.teamType != targetData.teamType;
if(firstTarget)
{
if(targetData.health > 0 && !targetIsEnemy)
{
return 0;
}
firstTarget = false;
}
if(targetData.health > 0)
{
if(targetIsEnemy)
{
if(this.ctfModel != null && this.ctfModel.isFlagCarrier(targetData))
{
effectivity += FLAG_CARRIER_BONUS * effectivityCoeff;
}
else
{
effectivity += effectivityCoeff;
}
}
else
{
effectivity -= effectivityCoeff;
}
}
effectivityCoeff *= this.weakeningCoeff;
targets.push(targetData);
hitPoints.push(this.intersection.pos.vClone());
}
this.multybodyPredicate.bodies[body] = true;
this.origin.vCopy(this.intersection.pos);
}
return effectivity;
}
private function collectTargetsAlongRay(shooterData:TankData, barrelOrigin:Vector3, barrelDir:Vector3, tanks:Dictionary, shotResult:RailgunShotResult) : void
{
var body:Body = null;
var targetData:TankData = null;
shotResult.hitPoints.length = 0;
shotResult.targets.length = 0;
shotResult.dir.vCopy(barrelDir);
this.multybodyPredicate.bodies = new Dictionary();
this.multybodyPredicate.bodies[shooterData.tank] = true;
this.origin.vCopy(barrelOrigin);
while(this.collisionDetector.intersectRay(this.origin,barrelDir,this.COLLISION_GROUP,this.MAX_RAY_LENGTH,this.multybodyPredicate,this.intersection))
{
body = this.intersection.primitive.body;
if(body == null)
{
shotResult.hitPoints.push(this.intersection.pos.vClone());
break;
}
targetData = tanks[body];
if(targetData != null)
{
shotResult.targets.push(targetData);
shotResult.hitPoints.push(this.intersection.pos.vClone());
}
this.multybodyPredicate.bodies[body] = true;
this.origin.vCopy(this.intersection.pos);
}
}
private function getDirectionPriority(angle:Number, distance:Number) : Number
{
return MAX_PRIORITY - (DISTANCE_WEIGHT * distance / BASE_DISTANCE + (1 - DISTANCE_WEIGHT) * angle / this.maxAngle);
}
}
}
import alternativa.physics.Body;
import alternativa.physics.collision.IRayCollisionPredicate;
import flash.utils.Dictionary;
class MultybodyCollisionPredicate implements IRayCollisionPredicate
{
public var bodies:Dictionary;
function MultybodyCollisionPredicate()
{
this.bodies = new Dictionary();
super();
}
public function considerBody(body:Body) : Boolean
{
return this.bodies[body] == null;
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.field.score.ctf {
public class CTFScoreIndicatorBlinker {
public var values:Vector.<Number>;
private var maxValue:Number;
private var minValue:Number;
private var intervals:Vector.<int>;
private var speedCoeffs:Vector.<Number>;
private var numValues:int;
private var speeds:Vector.<Number>;
private var switchTimes:Vector.<int>;
private var valueDelta:Number;
private var runCount:int = 0;
public function CTFScoreIndicatorBlinker(param1:Number, param2:Number, param3:Vector.<int>, param4:Vector.<Number>) {
super();
this.minValue = param1;
this.maxValue = param2;
this.intervals = param3;
this.speedCoeffs = param4;
this.valueDelta = param2 - param1;
this.numValues = param3.length;
this.speeds = new Vector.<Number>(this.numValues);
this.switchTimes = new Vector.<int>(this.numValues);
this.values = new Vector.<Number>(this.numValues);
}
public function start(param1:int) : void {
if(this.runCount == 0) {
this.init(param1);
}
++this.runCount;
}
public function stop() : void {
--this.runCount;
}
public function update(param1:int, param2:int) : void {
if(this.runCount <= 0) {
return;
}
var local3:int = 0;
while(local3 < this.numValues) {
this.values[local3] += this.speeds[local3] * param2;
if(this.values[local3] > this.maxValue) {
this.values[local3] = this.maxValue;
}
if(this.values[local3] < this.minValue) {
this.values[local3] = this.minValue;
}
if(param1 >= this.switchTimes[local3]) {
this.switchTimes[local3] += this.intervals[local3];
if(this.speeds[local3] < 0) {
this.speeds[local3] = this.getSpeed(1,this.speedCoeffs[local3],this.intervals[local3]);
} else {
this.speeds[local3] = this.getSpeed(-1,this.speedCoeffs[local3],this.intervals[local3]);
}
}
local3++;
}
}
private function init(param1:int) : void {
var local2:int = 0;
while(local2 < this.numValues) {
this.speeds[local2] = this.getSpeed(-1,this.speedCoeffs[local2],this.intervals[local2]);
this.values[local2] = this.maxValue;
this.switchTimes[local2] = param1 + this.intervals[local2];
local2++;
}
}
private function getSpeed(param1:Number, param2:Number, param3:int) : Number {
return param1 * param2 * this.valueDelta / param3;
}
}
}
|
package alternativa.tanks.display
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Camera3D;
import flash.display.Shape;
use namespace alternativa3d;
public class AxisIndicator extends Shape
{
private var _size:int;
private var axis1:Vector.<Number>;
public function AxisIndicator(size:int)
{
this.axis1 = Vector.<Number>([0,0,0,0,0,0]);
super();
this._size = size;
}
public function update(camera:Camera3D) : void
{
var kx:Number = NaN;
var ky:Number = NaN;
graphics.clear();
camera.composeMatrix();
this.axis1[0] = camera.ma;
this.axis1[1] = camera.mb;
this.axis1[2] = camera.me;
this.axis1[3] = camera.mf;
this.axis1[4] = camera.mi;
this.axis1[5] = camera.mj;
var bitOffset:int = 16;
for(var i:int = 0; i < 6; i += 2,bitOffset -= 8)
{
kx = this.axis1[i] + 1;
ky = this.axis1[int(i + 1)] + 1;
graphics.lineStyle(0,255 << bitOffset);
graphics.moveTo(this._size,this._size);
graphics.lineTo(this._size * kx,this._size * ky);
}
}
public function get size() : int
{
return this._size;
}
}
}
|
package projects.tanks.client.tanksservices.model.logging {
public interface IUserActionsLoggerModelBase {
}
}
|
package alternativa.tanks.gui.clanmanagement {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.clanmanagement.ClanProfileWindow_bitmapDeachIcon.png")]
public class ClanProfileWindow_bitmapDeachIcon extends BitmapAsset {
public function ClanProfileWindow_bitmapDeachIcon() {
super();
}
}
}
|
package alternativa.tanks.service.money {
public interface IMoneyListener {
function crystalsChanged(param1:int) : void;
}
}
|
package assets.combo {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.combo.combo_OVER_CENTER.png")]
public dynamic class combo_OVER_CENTER extends BitmapData {
public function combo_OVER_CENTER(param1:int = 175, param2:int = 31) {
super(param1,param2);
}
}
}
|
package utils.tweener {
import flash.display.Shape;
import flash.events.Event;
import flash.utils.Dictionary;
import flash.utils.getTimer;
import utils.tweener.core.PropTween;
import utils.tweener.core.SimpleTimeline;
import utils.tweener.core.TweenCore;
public class TweenLite extends TweenCore {
public static var onPluginEvent:Function;
public static var overwriteManager:Object;
public static var rootFrame:Number;
public static var rootTimeline:SimpleTimeline;
public static var rootFramesTimeline:SimpleTimeline;
public static var plugins:Object = {};
public static var defaultEase:Function = TweenLite.easeOut;
public static var masterList:Dictionary = new Dictionary(false);
private static var _shape:Shape = new Shape();
protected static var _reservedProps:Object = {
"ease":1,
"delay":1,
"overwrite":1,
"onComplete":1,
"onCompleteParams":1,
"useFrames":1,
"runBackwards":1,
"startAt":1,
"onUpdate":1,
"onUpdateParams":1,
"onStart":1,
"onStartParams":1,
"onInit":1,
"onInitParams":1,
"onReverseComplete":1,
"onReverseCompleteParams":1,
"onRepeat":1,
"onRepeatParams":1,
"proxiedEase":1,
"easeParams":1,
"yoyo":1,
"onCompleteListener":1,
"onUpdateListener":1,
"onStartListener":1,
"onReverseCompleteListener":1,
"onRepeatListener":1,
"orientToBezier":1,
"timeScale":1,
"immediateRender":1,
"repeat":1,
"repeatDelay":1,
"timeline":1,
"data":1,
"paused":1,
"reversed":1
};
public var target:Object;
public var propTweenLookup:Object;
public var ratio:Number = 0;
public var cachedPT1:PropTween;
protected var _ease:Function;
protected var _overwrite:int;
protected var _overwrittenProps:Object;
protected var _hasPlugins:Boolean;
protected var _notifyPluginsOfEnabled:Boolean;
public function TweenLite(param1:Object, param2:Number, param3:Object) {
var local5:TweenLite = null;
super(param2,param3);
if(param1 == null) {
throw new Error("Cannot tween a null object.");
}
this.target = param1;
if(this.target is TweenCore && Boolean(this.vars.timeScale)) {
this.cachedTimeScale = 1;
}
this.propTweenLookup = {};
this._ease = defaultEase;
this._overwrite = Number(param3.overwrite) <= -1 || !overwriteManager.enabled && param3.overwrite > 1 ? int(overwriteManager.mode) : int(param3.overwrite);
var local4:Array = masterList[param1];
if(!local4) {
masterList[param1] = [this];
} else if(this._overwrite == 1) {
for each(local5 in local4) {
if(!local5.gc) {
local5.setEnabled(false,false);
}
}
masterList[param1] = [this];
} else {
local4[local4.length] = this;
}
if(this.active || Boolean(this.vars.immediateRender)) {
this.renderTime(0,false,true);
}
}
public static function initClass() : void {
rootFrame = 0;
rootTimeline = new SimpleTimeline(null);
rootFramesTimeline = new SimpleTimeline(null);
rootTimeline.cachedStartTime = getTimer() * 0.001;
rootFramesTimeline.cachedStartTime = rootFrame;
rootTimeline.autoRemoveChildren = true;
rootFramesTimeline.autoRemoveChildren = true;
_shape.addEventListener(Event.ENTER_FRAME,updateAll,false,0,true);
if(overwriteManager == null) {
overwriteManager = {
"mode":1,
"enabled":false
};
}
}
public static function to(param1:Object, param2:Number, param3:Object) : TweenLite {
return new TweenLite(param1,param2,param3);
}
public static function from(param1:Object, param2:Number, param3:Object) : TweenLite {
if(Boolean(param3.isGSVars)) {
param3 = param3.vars;
}
param3.runBackwards = true;
if(!("immediateRender" in param3)) {
param3.immediateRender = true;
}
return new TweenLite(param1,param2,param3);
}
protected static function updateAll(param1:Event = null) : void {
var local2:Dictionary = null;
var local3:Object = null;
var local4:Array = null;
var local5:int = 0;
rootTimeline.renderTime((getTimer() * 0.001 - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale,false,false);
rootFrame += 1;
rootFramesTimeline.renderTime((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale,false,false);
if(!(rootFrame % 60)) {
local2 = masterList;
for(local3 in local2) {
local4 = local2[local3];
local5 = int(local4.length);
while(--local5 > -1) {
if(TweenLite(local4[local5]).gc) {
local4.splice(local5,1);
}
}
if(local4.length == 0) {
delete local2[local3];
}
}
}
}
public static function killTweensOf(param1:Object, param2:Boolean = false, param3:Object = null) : void {
var local4:Array = null;
var local5:int = 0;
var local6:TweenLite = null;
if(param1 in masterList) {
local4 = masterList[param1];
local5 = int(local4.length);
while(--local5 > -1) {
local6 = local4[local5];
if(!local6.gc) {
if(param2) {
local6.complete(false,false);
}
if(param3 != null) {
local6.killVars(param3);
}
if(param3 == null || local6.cachedPT1 == null && local6.initted) {
local6.setEnabled(false,false);
}
}
}
if(param3 == null) {
delete masterList[param1];
}
}
}
protected static function easeOut(param1:Number, param2:Number, param3:Number, param4:Number) : Number {
return 1 - (param1 = 1 - param1 / param4) * param1;
}
protected function init() : void {
var local1:String = null;
var local2:int = 0;
var local3:* = undefined;
var local4:Boolean = false;
var local5:Array = null;
var local6:PropTween = null;
if(Boolean(this.vars.onInit)) {
this.vars.onInit.apply(null,this.vars.onInitParams);
}
if(typeof this.vars.ease == "function") {
this._ease = this.vars.ease;
}
if(Boolean(this.vars.easeParams)) {
this.vars.proxiedEase = this._ease;
this._ease = this.easeProxy;
}
this.cachedPT1 = null;
this.propTweenLookup = {};
for(local1 in this.vars) {
if(!(local1 in _reservedProps && !(local1 == "timeScale" && this.target is TweenCore))) {
if(local1 in plugins && Boolean((local3 = new (plugins[local1] as Class)()).onInitTween(this.target,this.vars[local1],this))) {
this.cachedPT1 = new PropTween(local3,"changeFactor",0,1,local3.overwriteProps.length == 1 ? local3.overwriteProps[0] : "_MULTIPLE_",true,this.cachedPT1);
if(this.cachedPT1.name == "_MULTIPLE_") {
local2 = int(local3.overwriteProps.length);
while(--local2 > -1) {
this.propTweenLookup[local3.overwriteProps[local2]] = this.cachedPT1;
}
} else {
this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1;
}
if(Boolean(local3.priority)) {
this.cachedPT1.priority = local3.priority;
local4 = true;
}
if(Boolean(local3.onDisable) || Boolean(local3.onEnable)) {
this._notifyPluginsOfEnabled = true;
}
this._hasPlugins = true;
} else {
this.cachedPT1 = new PropTween(this.target,local1,Number(this.target[local1]),typeof this.vars[local1] == "number" ? Number(this.vars[local1]) - this.target[local1] : Number(this.vars[local1]),local1,false,this.cachedPT1);
this.propTweenLookup[local1] = this.cachedPT1;
}
}
}
if(local4) {
onPluginEvent("onInitAllProps",this);
}
if(Boolean(this.vars.runBackwards)) {
local6 = this.cachedPT1;
while(Boolean(local6)) {
local6.start += local6.change;
local6.change = -local6.change;
local6 = local6.nextNode;
}
}
_hasUpdate = Boolean(this.vars.onUpdate != null);
if(Boolean(this._overwrittenProps)) {
this.killVars(this._overwrittenProps);
if(this.cachedPT1 == null) {
this.setEnabled(false,false);
}
}
if(this._overwrite > 1 && this.cachedPT1 && (local5 = masterList[this.target]) && local5.length > 1) {
if(Boolean(overwriteManager.manageOverwrites(this,this.propTweenLookup,local5,this._overwrite))) {
this.init();
}
}
this.initted = true;
}
override public function renderTime(param1:Number, param2:Boolean = false, param3:Boolean = false) : void {
var local4:Boolean = false;
var local5:Number = this.cachedTime;
if(param1 >= this.cachedDuration) {
this.cachedTotalTime = this.cachedTime = this.cachedDuration;
this.ratio = 1;
local4 = !this.cachedReversed;
if(this.cachedDuration == 0) {
if((param1 == 0 || _rawPrevTime < 0) && _rawPrevTime != param1) {
param3 = true;
}
_rawPrevTime = param1;
}
} else if(param1 <= 0) {
this.cachedTotalTime = this.cachedTime = this.ratio = 0;
if(param1 < 0) {
this.active = false;
if(this.cachedDuration == 0) {
if(_rawPrevTime >= 0) {
param3 = true;
local4 = _rawPrevTime > 0;
}
_rawPrevTime = param1;
}
}
if(this.cachedReversed && local5 != 0) {
local4 = true;
}
} else {
this.cachedTotalTime = this.cachedTime = param1;
this.ratio = this._ease(param1,0,1,this.cachedDuration);
}
if(this.cachedTime == local5 && !param3) {
return;
}
if(!this.initted) {
this.init();
if(!local4 && Boolean(this.cachedTime)) {
this.ratio = this._ease(this.cachedTime,0,1,this.cachedDuration);
}
}
if(!this.active && !this.cachedPaused) {
this.active = true;
}
if(local5 == 0 && this.vars.onStart && (this.cachedTime != 0 || this.cachedDuration == 0) && !param2) {
this.vars.onStart.apply(null,this.vars.onStartParams);
}
var local6:PropTween = this.cachedPT1;
while(Boolean(local6)) {
local6.target[local6.property] = local6.start + this.ratio * local6.change;
local6 = local6.nextNode;
}
if(_hasUpdate && !param2) {
this.vars.onUpdate.apply(null,this.vars.onUpdateParams);
}
if(local4 && !this.gc) {
if(this._hasPlugins && Boolean(this.cachedPT1)) {
onPluginEvent("onComplete",this);
}
complete(true,param2);
}
}
public function killVars(param1:Object, param2:Boolean = true) : Boolean {
var local3:String = null;
var local4:PropTween = null;
var local5:Boolean = false;
if(this._overwrittenProps == null) {
this._overwrittenProps = {};
}
for(local3 in param1) {
if(local3 in this.propTweenLookup) {
local4 = this.propTweenLookup[local3];
if(local4.isPlugin && local4.name == "_MULTIPLE_") {
local4.target.killProps(param1);
if(local4.target.overwriteProps.length == 0) {
local4.name = "";
}
if(local3 != local4.target.propName || local4.name == "") {
delete this.propTweenLookup[local3];
}
}
if(local4.name != "_MULTIPLE_") {
if(Boolean(local4.nextNode)) {
local4.nextNode.prevNode = local4.prevNode;
}
if(Boolean(local4.prevNode)) {
local4.prevNode.nextNode = local4.nextNode;
} else if(this.cachedPT1 == local4) {
this.cachedPT1 = local4.nextNode;
}
if(local4.isPlugin && Boolean(local4.target.onDisable)) {
local4.target.onDisable();
if(Boolean(local4.target.activeDisable)) {
local5 = true;
}
}
delete this.propTweenLookup[local3];
}
}
if(param2 && param1 != this._overwrittenProps) {
this._overwrittenProps[local3] = 1;
}
}
return local5;
}
override public function invalidate() : void {
if(this._notifyPluginsOfEnabled && Boolean(this.cachedPT1)) {
onPluginEvent("onDisable",this);
}
this.cachedPT1 = null;
this._overwrittenProps = null;
_hasUpdate = this.initted = this.active = this._notifyPluginsOfEnabled = false;
this.propTweenLookup = {};
}
override public function setEnabled(param1:Boolean, param2:Boolean = false) : Boolean {
var local3:Array = null;
if(param1) {
local3 = TweenLite.masterList[this.target];
if(!local3) {
TweenLite.masterList[this.target] = [this];
} else if(local3.indexOf(this) == -1) {
local3[local3.length] = this;
}
}
super.setEnabled(param1,param2);
if(this._notifyPluginsOfEnabled && Boolean(this.cachedPT1)) {
return onPluginEvent(param1 ? "onEnable" : "onDisable",this);
}
return false;
}
protected function easeProxy(param1:Number, param2:Number, param3:Number, param4:Number) : Number {
return this.vars.proxiedEase.apply(null,arguments.concat(this.vars.easeParams));
}
}
}
|
package alternativa.engine3d.core {
import alternativa.engine3d.alternativa3d;
import flash.events.Event;
import flash.events.IEventDispatcher;
import flash.geom.ColorTransform;
import flash.geom.Matrix3D;
import flash.geom.Vector3D;
import flash.utils.Dictionary;
import flash.utils.getQualifiedClassName;
use namespace alternativa3d;
[Event(name="mouseWheel",type="alternativa.engine3d.core.MouseEvent3D")]
[Event(name="mouseMove",type="alternativa.engine3d.core.MouseEvent3D")]
[Event(name="rollOut",type="alternativa.engine3d.core.MouseEvent3D")]
[Event(name="rollOver",type="alternativa.engine3d.core.MouseEvent3D")]
[Event(name="mouseOut",type="alternativa.engine3d.core.MouseEvent3D")]
[Event(name="mouseOver",type="alternativa.engine3d.core.MouseEvent3D")]
[Event(name="mouseUp",type="alternativa.engine3d.core.MouseEvent3D")]
[Event(name="mouseDown",type="alternativa.engine3d.core.MouseEvent3D")]
[Event(name="doubleClick",type="alternativa.engine3d.core.MouseEvent3D")]
[Event(name="click",type="alternativa.engine3d.core.MouseEvent3D")]
public class Object3D implements IEventDispatcher {
alternativa3d static const boundVertexList:Vertex = Vertex.alternativa3d::createList(8);
alternativa3d static const tA:Object3D = new Object3D();
alternativa3d static const tB:Object3D = new Object3D();
private static const staticSphere:Vector3D = new Vector3D();
public var x:Number = 0;
public var y:Number = 0;
public var z:Number = 0;
public var rotationX:Number = 0;
public var rotationY:Number = 0;
public var rotationZ:Number = 0;
public var scaleX:Number = 1;
public var scaleY:Number = 1;
public var scaleZ:Number = 1;
public var name:String;
public var originalName:String;
public var visible:Boolean = true;
public var alpha:Number = 1;
public var blendMode:String = "normal";
public var colorTransform:ColorTransform = null;
public var filters:Array = null;
public var mouseEnabled:Boolean = true;
public var doubleClickEnabled:Boolean = false;
public var useHandCursor:Boolean = false;
public var depthMapAlphaThreshold:Number = 1;
public var shadowMapAlphaThreshold:Number = 1;
public var softAttenuation:Number = 0;
public var useShadowMap:Boolean = true;
public var useLight:Boolean = true;
public var boundMinX:Number = -1e+22;
public var boundMinY:Number = -1e+22;
public var boundMinZ:Number = -1e+22;
public var boundMaxX:Number = 1e+22;
public var boundMaxY:Number = 1e+22;
public var boundMaxZ:Number = 1e+22;
alternativa3d var ma:Number;
alternativa3d var mb:Number;
alternativa3d var mc:Number;
alternativa3d var md:Number;
alternativa3d var me:Number;
alternativa3d var mf:Number;
alternativa3d var mg:Number;
alternativa3d var mh:Number;
alternativa3d var mi:Number;
alternativa3d var mj:Number;
alternativa3d var mk:Number;
alternativa3d var ml:Number;
alternativa3d var ima:Number;
alternativa3d var imb:Number;
alternativa3d var imc:Number;
alternativa3d var imd:Number;
alternativa3d var ime:Number;
alternativa3d var imf:Number;
alternativa3d var img:Number;
alternativa3d var imh:Number;
alternativa3d var imi:Number;
alternativa3d var imj:Number;
alternativa3d var imk:Number;
alternativa3d var iml:Number;
alternativa3d var _parent:Object3DContainer;
alternativa3d var next:Object3D;
alternativa3d var culling:int = 0;
alternativa3d var transformId:int = 0;
alternativa3d var distance:Number;
alternativa3d var bubbleListeners:Object;
alternativa3d var captureListeners:Object;
public function Object3D() {
super();
}
public function get matrix() : Matrix3D {
alternativa3d::tA.alternativa3d::composeMatrixFromSource(this);
// SDK bug - namespaces in array literals cause internal compiler error
return new Matrix3D(Vector.<Number>([tA.ma, tA.me, tA.mi, 0, tA.mb, tA.mf, tA.mj, 0, tA.mc, tA.mg, tA.mk, 0, tA.md, tA.mh, tA.ml, 1]));
}
public function set matrix(param1:Matrix3D) : void {
var local2:Vector.<Vector3D> = param1.decompose();
var local3:Vector3D = local2[0];
var local4:Vector3D = local2[1];
var local5:Vector3D = local2[2];
this.x = local3.x;
this.y = local3.y;
this.z = local3.z;
this.rotationX = local4.x;
this.rotationY = local4.y;
this.rotationZ = local4.z;
this.scaleX = local5.x;
this.scaleY = local5.y;
this.scaleZ = local5.z;
}
public function get concatenatedMatrix() : Matrix3D {
alternativa3d::tA.alternativa3d::composeMatrixFromSource(this);
var local1:Object3D = this;
while(local1.alternativa3d::_parent != null) {
local1 = local1.alternativa3d::_parent;
alternativa3d::tB.alternativa3d::composeMatrixFromSource(local1);
alternativa3d::tA.alternativa3d::appendMatrix(alternativa3d::tB);
}
// SDK bug - namespaces in array literals cause internal compiler error
return new Matrix3D(Vector.<Number>([tA.ma, tA.me, tA.mi, 0, tA.mb, tA.mf, tA.mj, 0, tA.mc, tA.mg, tA.mk, 0, tA.md, tA.mh, tA.ml, 1]));
}
public function localToGlobal(param1:Vector3D) : Vector3D {
alternativa3d::tA.alternativa3d::composeMatrixFromSource(this);
var local2:Object3D = this;
while(local2.alternativa3d::_parent != null) {
local2 = local2.alternativa3d::_parent;
alternativa3d::tB.alternativa3d::composeMatrixFromSource(local2);
alternativa3d::tA.alternativa3d::appendMatrix(alternativa3d::tB);
}
var local3:Vector3D = new Vector3D();
local3.x = alternativa3d::tA.alternativa3d::ma * param1.x + alternativa3d::tA.alternativa3d::mb * param1.y + alternativa3d::tA.alternativa3d::mc * param1.z + alternativa3d::tA.alternativa3d::md;
local3.y = alternativa3d::tA.alternativa3d::me * param1.x + alternativa3d::tA.alternativa3d::mf * param1.y + alternativa3d::tA.alternativa3d::mg * param1.z + alternativa3d::tA.alternativa3d::mh;
local3.z = alternativa3d::tA.alternativa3d::mi * param1.x + alternativa3d::tA.alternativa3d::mj * param1.y + alternativa3d::tA.alternativa3d::mk * param1.z + alternativa3d::tA.alternativa3d::ml;
return local3;
}
public function globalToLocal(param1:Vector3D) : Vector3D {
alternativa3d::tA.alternativa3d::composeMatrixFromSource(this);
var local2:Object3D = this;
while(local2.alternativa3d::_parent != null) {
local2 = local2.alternativa3d::_parent;
alternativa3d::tB.alternativa3d::composeMatrixFromSource(local2);
alternativa3d::tA.alternativa3d::appendMatrix(alternativa3d::tB);
}
alternativa3d::tA.alternativa3d::invertMatrix();
var local3:Vector3D = new Vector3D();
local3.x = alternativa3d::tA.alternativa3d::ma * param1.x + alternativa3d::tA.alternativa3d::mb * param1.y + alternativa3d::tA.alternativa3d::mc * param1.z + alternativa3d::tA.alternativa3d::md;
local3.y = alternativa3d::tA.alternativa3d::me * param1.x + alternativa3d::tA.alternativa3d::mf * param1.y + alternativa3d::tA.alternativa3d::mg * param1.z + alternativa3d::tA.alternativa3d::mh;
local3.z = alternativa3d::tA.alternativa3d::mi * param1.x + alternativa3d::tA.alternativa3d::mj * param1.y + alternativa3d::tA.alternativa3d::mk * param1.z + alternativa3d::tA.alternativa3d::ml;
return local3;
}
public function get parent() : Object3DContainer {
return this.alternativa3d::_parent;
}
alternativa3d function setParent(param1:Object3DContainer) : void {
this.alternativa3d::_parent = param1;
}
public function calculateBounds() : void {
this.boundMinX = 1e+22;
this.boundMinY = 1e+22;
this.boundMinZ = 1e+22;
this.boundMaxX = -1e+22;
this.boundMaxY = -1e+22;
this.boundMaxZ = -1e+22;
this.alternativa3d::updateBounds(this,null);
if(this.boundMinX > this.boundMaxX) {
this.boundMinX = -1e+22;
this.boundMinY = -1e+22;
this.boundMinZ = -1e+22;
this.boundMaxX = 1e+22;
this.boundMaxY = 1e+22;
this.boundMaxZ = 1e+22;
}
}
public function addEventListener(param1:String, param2:Function, param3:Boolean = false, param4:int = 0, param5:Boolean = false) : void {
var local6:Object = null;
if(param2 == null) {
throw new TypeError("Parameter listener must be non-null.");
}
if(param3) {
if(this.alternativa3d::captureListeners == null) {
this.alternativa3d::captureListeners = new Object();
}
local6 = this.alternativa3d::captureListeners;
} else {
if(this.alternativa3d::bubbleListeners == null) {
this.alternativa3d::bubbleListeners = new Object();
}
local6 = this.alternativa3d::bubbleListeners;
}
var local7:Vector.<Function> = local6[param1];
if(local7 == null) {
local7 = new Vector.<Function>();
local6[param1] = local7;
}
if(local7.indexOf(param2) < 0) {
local7.push(param2);
}
}
public function removeEventListener(param1:String, param2:Function, param3:Boolean = false) : void {
var local5:Vector.<Function> = null;
var local6:int = 0;
var local7:int = 0;
var local8:int = 0;
var local9:* = undefined;
if(param2 == null) {
throw new TypeError("Parameter listener must be non-null.");
}
var local4:Object = param3 ? this.alternativa3d::captureListeners : this.alternativa3d::bubbleListeners;
if(local4 != null) {
local5 = local4[param1];
if(local5 != null) {
local6 = int(local5.indexOf(param2));
if(local6 >= 0) {
local7 = int(local5.length);
local8 = local6 + 1;
while(local8 < local7) {
local5[local6] = local5[local8];
local8++;
local6++;
}
if(local7 > 1) {
local5.length = local7 - 1;
} else {
delete local4[param1];
var local10:int = 0;
var local11:* = local4;
for(local9 in local11) {
}
if(!local9) {
if(local4 == this.alternativa3d::captureListeners) {
this.alternativa3d::captureListeners = null;
} else {
this.alternativa3d::bubbleListeners = null;
}
}
}
}
}
}
}
public function hasEventListener(param1:String) : Boolean {
return this.alternativa3d::captureListeners != null && Boolean(this.alternativa3d::captureListeners[param1]) || this.alternativa3d::bubbleListeners != null && Boolean(this.alternativa3d::bubbleListeners[param1]);
}
public function willTrigger(param1:String) : Boolean {
var local2:Object3D = this;
while(local2 != null) {
if(local2.alternativa3d::captureListeners != null && local2.alternativa3d::captureListeners[param1] || local2.alternativa3d::bubbleListeners != null && local2.alternativa3d::bubbleListeners[param1]) {
return true;
}
local2 = local2.alternativa3d::_parent;
}
return false;
}
public function dispatchEvent(param1:Event) : Boolean {
var local4:Object3D = null;
var local6:Vector.<Function> = null;
var local7:int = 0;
var local8:int = 0;
var local9:Vector.<Function> = null;
if(param1 == null) {
throw new TypeError("Parameter event must be non-null.");
}
if(param1 is MouseEvent3D) {
MouseEvent3D(param1).alternativa3d::_target = this;
}
var local2:Vector.<Object3D> = new Vector.<Object3D>();
var local3:int = 0;
local4 = this;
while(local4 != null) {
local2[local3] = local4;
local3++;
local4 = local4.alternativa3d::_parent;
}
var local5:int = 0;
while(local5 < local3) {
local4 = local2[local5];
if(param1 is MouseEvent3D) {
MouseEvent3D(param1).alternativa3d::_currentTarget = local4;
}
if(this.alternativa3d::bubbleListeners != null) {
local6 = this.alternativa3d::bubbleListeners[param1.type];
if(local6 != null) {
local8 = int(local6.length);
local9 = new Vector.<Function>();
local7 = 0;
while(local7 < local8) {
local9[local7] = local6[local7];
local7++;
}
local7 = 0;
while(local7 < local8) {
(local9[local7] as Function).call(null,param1);
local7++;
}
}
}
if(!param1.bubbles) {
break;
}
local5++;
}
return true;
}
public function calculateResolution(param1:int, param2:int, param3:int = 1, param4:Matrix3D = null) : Number {
return 1;
}
public function intersectRay(param1:Vector3D, param2:Vector3D, param3:Dictionary = null, param4:Camera3D = null) : RayIntersectionData {
return null;
}
alternativa3d function checkIntersection(param1:Number, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number, param8:Dictionary) : Boolean {
return false;
}
alternativa3d function boundCheckIntersection(param1:Number, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number, param8:Number, param9:Number, param10:Number, param11:Number, param12:Number, param13:Number) : Boolean {
var local17:Number = NaN;
var local18:Number = NaN;
var local19:Number = NaN;
var local20:Number = NaN;
var local14:Number = param1 + param4 * param7;
var local15:Number = param2 + param5 * param7;
var local16:Number = param3 + param6 * param7;
if(param1 >= param8 && param1 <= param11 && param2 >= param9 && param2 <= param12 && param3 >= param10 && param3 <= param13 || local14 >= param8 && local14 <= param11 && local15 >= param9 && local15 <= param12 && local16 >= param10 && local16 <= param13) {
return true;
}
if(param1 < param8 && local14 < param8 || param1 > param11 && local14 > param11 || param2 < param9 && local15 < param9 || param2 > param12 && local15 > param12 || param3 < param10 && local16 < param10 || param3 > param13 && local16 > param13) {
return false;
}
var local21:Number = 0.000001;
if(param4 > local21) {
local17 = (param8 - param1) / param4;
local18 = (param11 - param1) / param4;
} else if(param4 < -local21) {
local17 = (param11 - param1) / param4;
local18 = (param8 - param1) / param4;
} else {
local17 = 0;
local18 = param7;
}
if(param5 > local21) {
local19 = (param9 - param2) / param5;
local20 = (param12 - param2) / param5;
} else if(param5 < -local21) {
local19 = (param12 - param2) / param5;
local20 = (param9 - param2) / param5;
} else {
local19 = 0;
local20 = param7;
}
if(local19 >= local18 || local20 <= local17) {
return false;
}
if(local19 < local17) {
if(local20 < local18) {
local18 = local20;
}
} else {
local17 = local19;
if(local20 < local18) {
local18 = local20;
}
}
if(param6 > local21) {
local19 = (param10 - param3) / param6;
local20 = (param13 - param3) / param6;
} else if(param6 < -local21) {
local19 = (param13 - param3) / param6;
local20 = (param10 - param3) / param6;
} else {
local19 = 0;
local20 = param7;
}
if(local19 >= local18 || local20 <= local17) {
return false;
}
return true;
}
public function clone() : Object3D {
var local1:Object3D = new Object3D();
local1.clonePropertiesFrom(this);
return local1;
}
protected function clonePropertiesFrom(param1:Object3D) : void {
this.name = param1.name;
this.visible = param1.visible;
this.alpha = param1.alpha;
this.blendMode = param1.blendMode;
this.mouseEnabled = param1.mouseEnabled;
this.doubleClickEnabled = param1.doubleClickEnabled;
this.useHandCursor = param1.useHandCursor;
this.depthMapAlphaThreshold = param1.depthMapAlphaThreshold;
this.shadowMapAlphaThreshold = param1.shadowMapAlphaThreshold;
this.softAttenuation = param1.softAttenuation;
this.useShadowMap = param1.useShadowMap;
this.useLight = param1.useLight;
this.alternativa3d::transformId = param1.alternativa3d::transformId;
this.alternativa3d::distance = param1.alternativa3d::distance;
if(param1.colorTransform != null) {
this.colorTransform = new ColorTransform();
this.colorTransform.concat(param1.colorTransform);
}
if(param1.filters != null) {
this.filters = new Array().concat(param1.filters);
}
this.x = param1.x;
this.y = param1.y;
this.z = param1.z;
this.rotationX = param1.rotationX;
this.rotationY = param1.rotationY;
this.rotationZ = param1.rotationZ;
this.scaleX = param1.scaleX;
this.scaleY = param1.scaleY;
this.scaleZ = param1.scaleZ;
this.boundMinX = param1.boundMinX;
this.boundMinY = param1.boundMinY;
this.boundMinZ = param1.boundMinZ;
this.boundMaxX = param1.boundMaxX;
this.boundMaxY = param1.boundMaxY;
this.boundMaxZ = param1.boundMaxZ;
}
public function toString() : String {
var local1:String = getQualifiedClassName(this);
return "[" + local1.substr(local1.indexOf("::") + 2) + " " + this.name + "]";
}
alternativa3d function draw(param1:Camera3D, param2:Canvas) : void {
}
alternativa3d function getVG(param1:Camera3D) : VG {
return null;
}
alternativa3d function updateBounds(param1:Object3D, param2:Object3D = null) : void {
}
alternativa3d function boundIntersectRay(param1:Vector3D, param2:Vector3D, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number, param8:Number) : Boolean {
var local9:Number = NaN;
var local10:Number = NaN;
var local11:Number = NaN;
var local12:Number = NaN;
if(param1.x >= param3 && param1.x <= param6 && param1.y >= param4 && param1.y <= param7 && param1.z >= param5 && param1.z <= param8) {
return true;
}
if(param1.x < param3 && param2.x <= 0 || param1.x > param6 && param2.x >= 0 || param1.y < param4 && param2.y <= 0 || param1.y > param7 && param2.y >= 0 || param1.z < param5 && param2.z <= 0 || param1.z > param8 && param2.z >= 0) {
return false;
}
var local13:Number = 0.000001;
if(param2.x > local13) {
local9 = (param3 - param1.x) / param2.x;
local10 = (param6 - param1.x) / param2.x;
} else if(param2.x < -local13) {
local9 = (param6 - param1.x) / param2.x;
local10 = (param3 - param1.x) / param2.x;
} else {
local9 = 0;
local10 = 1e+22;
}
if(param2.y > local13) {
local11 = (param4 - param1.y) / param2.y;
local12 = (param7 - param1.y) / param2.y;
} else if(param2.y < -local13) {
local11 = (param7 - param1.y) / param2.y;
local12 = (param4 - param1.y) / param2.y;
} else {
local11 = 0;
local12 = 1e+22;
}
if(local11 >= local10 || local12 <= local9) {
return false;
}
if(local11 < local9) {
if(local12 < local10) {
local10 = local12;
}
} else {
local9 = local11;
if(local12 < local10) {
local10 = local12;
}
}
if(param2.z > local13) {
local11 = (param5 - param1.z) / param2.z;
local12 = (param8 - param1.z) / param2.z;
} else if(param2.z < -local13) {
local11 = (param8 - param1.z) / param2.z;
local12 = (param5 - param1.z) / param2.z;
} else {
local11 = 0;
local12 = 1e+22;
}
if(local11 >= local10 || local12 <= local9) {
return false;
}
return true;
}
alternativa3d function collectPlanes(param1:Vector3D, param2:Vector3D, param3:Vector3D, param4:Vector3D, param5:Vector3D, param6:Vector.<Face>, param7:Dictionary = null) : void {
}
alternativa3d function calculateSphere(param1:Vector3D, param2:Vector3D, param3:Vector3D, param4:Vector3D, param5:Vector3D, param6:Vector3D = null) : Vector3D {
this.alternativa3d::calculateInverseMatrix();
var local7:Number = this.alternativa3d::ima * param1.x + this.alternativa3d::imb * param1.y + this.alternativa3d::imc * param1.z + this.alternativa3d::imd;
var local8:Number = this.alternativa3d::ime * param1.x + this.alternativa3d::imf * param1.y + this.alternativa3d::img * param1.z + this.alternativa3d::imh;
var local9:Number = this.alternativa3d::imi * param1.x + this.alternativa3d::imj * param1.y + this.alternativa3d::imk * param1.z + this.alternativa3d::iml;
var local10:Number = this.alternativa3d::ima * param2.x + this.alternativa3d::imb * param2.y + this.alternativa3d::imc * param2.z + this.alternativa3d::imd;
var local11:Number = this.alternativa3d::ime * param2.x + this.alternativa3d::imf * param2.y + this.alternativa3d::img * param2.z + this.alternativa3d::imh;
var local12:Number = this.alternativa3d::imi * param2.x + this.alternativa3d::imj * param2.y + this.alternativa3d::imk * param2.z + this.alternativa3d::iml;
var local13:Number = this.alternativa3d::ima * param3.x + this.alternativa3d::imb * param3.y + this.alternativa3d::imc * param3.z + this.alternativa3d::imd;
var local14:Number = this.alternativa3d::ime * param3.x + this.alternativa3d::imf * param3.y + this.alternativa3d::img * param3.z + this.alternativa3d::imh;
var local15:Number = this.alternativa3d::imi * param3.x + this.alternativa3d::imj * param3.y + this.alternativa3d::imk * param3.z + this.alternativa3d::iml;
var local16:Number = this.alternativa3d::ima * param4.x + this.alternativa3d::imb * param4.y + this.alternativa3d::imc * param4.z + this.alternativa3d::imd;
var local17:Number = this.alternativa3d::ime * param4.x + this.alternativa3d::imf * param4.y + this.alternativa3d::img * param4.z + this.alternativa3d::imh;
var local18:Number = this.alternativa3d::imi * param4.x + this.alternativa3d::imj * param4.y + this.alternativa3d::imk * param4.z + this.alternativa3d::iml;
var local19:Number = this.alternativa3d::ima * param5.x + this.alternativa3d::imb * param5.y + this.alternativa3d::imc * param5.z + this.alternativa3d::imd;
var local20:Number = this.alternativa3d::ime * param5.x + this.alternativa3d::imf * param5.y + this.alternativa3d::img * param5.z + this.alternativa3d::imh;
var local21:Number = this.alternativa3d::imi * param5.x + this.alternativa3d::imj * param5.y + this.alternativa3d::imk * param5.z + this.alternativa3d::iml;
var local22:Number = local10 - local7;
var local23:Number = local11 - local8;
var local24:Number = local12 - local9;
var local25:Number = local22 * local22 + local23 * local23 + local24 * local24;
local22 = local13 - local7;
local23 = local14 - local8;
local24 = local15 - local9;
var local26:Number = local22 * local22 + local23 * local23 + local24 * local24;
if(local26 > local25) {
local25 = local26;
}
local22 = local16 - local7;
local23 = local17 - local8;
local24 = local18 - local9;
local26 = local22 * local22 + local23 * local23 + local24 * local24;
if(local26 > local25) {
local25 = local26;
}
local22 = local19 - local7;
local23 = local20 - local8;
local24 = local21 - local9;
local26 = local22 * local22 + local23 * local23 + local24 * local24;
if(local26 > local25) {
local25 = local26;
}
if(param6 == null) {
param6 = staticSphere;
}
param6.x = local7;
param6.y = local8;
param6.z = local9;
param6.w = Math.sqrt(local25);
return param6;
}
alternativa3d function boundIntersectSphere(param1:Vector3D, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number) : Boolean {
return param1.x + param1.w > param2 && param1.x - param1.w < param5 && param1.y + param1.w > param3 && param1.y - param1.w < param6 && param1.z + param1.w > param4 && param1.z - param1.w < param7;
}
alternativa3d function split(param1:Vector3D, param2:Vector3D, param3:Vector3D, param4:Number) : Vector.<Object3D> {
return new Vector.<Object3D>(2);
}
alternativa3d function testSplit(param1:Vector3D, param2:Vector3D, param3:Vector3D, param4:Number) : int {
var local5:Vector3D = this.alternativa3d::calculatePlane(param1,param2,param3);
if(local5.x >= 0) {
if(local5.y >= 0) {
if(local5.z >= 0) {
if(this.boundMaxX * local5.x + this.boundMaxY * local5.y + this.boundMaxZ * local5.z <= local5.w + param4) {
return -1;
}
if(this.boundMinX * local5.x + this.boundMinY * local5.y + this.boundMinZ * local5.z >= local5.w - param4) {
return 1;
}
} else {
if(this.boundMaxX * local5.x + this.boundMaxY * local5.y + this.boundMinZ * local5.z <= local5.w + param4) {
return -1;
}
if(this.boundMinX * local5.x + this.boundMinY * local5.y + this.boundMaxZ * local5.z >= local5.w - param4) {
return 1;
}
}
} else if(local5.z >= 0) {
if(this.boundMaxX * local5.x + this.boundMinY * local5.y + this.boundMaxZ * local5.z <= local5.w + param4) {
return -1;
}
if(this.boundMinX * local5.x + this.boundMaxY * local5.y + this.boundMinZ * local5.z >= local5.w - param4) {
return 1;
}
} else {
if(this.boundMaxX * local5.x + this.boundMinY * local5.y + this.boundMinZ * local5.z <= local5.w + param4) {
return -1;
}
if(this.boundMinX * local5.x + this.boundMaxY * local5.y + this.boundMaxZ * local5.z >= local5.w - param4) {
return 1;
}
}
} else if(local5.y >= 0) {
if(local5.z >= 0) {
if(this.boundMinX * local5.x + this.boundMaxY * local5.y + this.boundMaxZ * local5.z <= local5.w + param4) {
return -1;
}
if(this.boundMaxX * local5.x + this.boundMinY * local5.y + this.boundMinZ * local5.z >= local5.w - param4) {
return 1;
}
} else {
if(this.boundMinX * local5.x + this.boundMaxY * local5.y + this.boundMinZ * local5.z <= local5.w + param4) {
return -1;
}
if(this.boundMaxX * local5.x + this.boundMinY * local5.y + this.boundMaxZ * local5.z >= local5.w - param4) {
return 1;
}
}
} else if(local5.z >= 0) {
if(this.boundMinX * local5.x + this.boundMinY * local5.y + this.boundMaxZ * local5.z <= local5.w + param4) {
return -1;
}
if(this.boundMaxX * local5.x + this.boundMaxY * local5.y + this.boundMinZ * local5.z >= local5.w - param4) {
return 1;
}
} else {
if(this.boundMinX * local5.x + this.boundMinY * local5.y + this.boundMinZ * local5.z <= local5.w + param4) {
return -1;
}
if(this.boundMaxX * local5.x + this.boundMaxY * local5.y + this.boundMaxZ * local5.z >= local5.w - param4) {
return 1;
}
}
return 0;
}
alternativa3d function calculatePlane(param1:Vector3D, param2:Vector3D, param3:Vector3D) : Vector3D {
var local4:Vector3D = new Vector3D();
var local5:Number = param2.x - param1.x;
var local6:Number = param2.y - param1.y;
var local7:Number = param2.z - param1.z;
var local8:Number = param3.x - param1.x;
var local9:Number = param3.y - param1.y;
var local10:Number = param3.z - param1.z;
local4.x = local10 * local6 - local9 * local7;
local4.y = local8 * local7 - local10 * local5;
local4.z = local9 * local5 - local8 * local6;
var local11:Number = local4.x * local4.x + local4.y * local4.y + local4.z * local4.z;
if(local11 > 0.0001) {
local11 = Math.sqrt(local11);
local4.x /= local11;
local4.y /= local11;
local4.z /= local11;
}
local4.w = param1.x * local4.x + param1.y * local4.y + param1.z * local4.z;
return local4;
}
alternativa3d function composeMatrix() : void {
var local1:Number = Math.cos(this.rotationX);
var local2:Number = Math.sin(this.rotationX);
var local3:Number = Math.cos(this.rotationY);
var local4:Number = Math.sin(this.rotationY);
var local5:Number = Math.cos(this.rotationZ);
var local6:Number = Math.sin(this.rotationZ);
var local7:Number = local5 * local4;
var local8:Number = local6 * local4;
var local9:Number = local3 * this.scaleX;
var local10:Number = local2 * this.scaleY;
var local11:Number = local1 * this.scaleY;
var local12:Number = local1 * this.scaleZ;
var local13:Number = local2 * this.scaleZ;
this.alternativa3d::ma = local5 * local9;
this.alternativa3d::mb = local7 * local10 - local6 * local11;
this.alternativa3d::mc = local7 * local12 + local6 * local13;
this.alternativa3d::md = this.x;
this.alternativa3d::me = local6 * local9;
this.alternativa3d::mf = local8 * local10 + local5 * local11;
this.alternativa3d::mg = local8 * local12 - local5 * local13;
this.alternativa3d::mh = this.y;
this.alternativa3d::mi = -local4 * this.scaleX;
this.alternativa3d::mj = local3 * local10;
this.alternativa3d::mk = local3 * local12;
this.alternativa3d::ml = this.z;
}
alternativa3d function composeMatrixFromSource(param1:Object3D) : void {
var local2:Number = Math.cos(param1.rotationX);
var local3:Number = Math.sin(param1.rotationX);
var local4:Number = Math.cos(param1.rotationY);
var local5:Number = Math.sin(param1.rotationY);
var local6:Number = Math.cos(param1.rotationZ);
var local7:Number = Math.sin(param1.rotationZ);
var local8:Number = local6 * local5;
var local9:Number = local7 * local5;
var local10:Number = local4 * param1.scaleX;
var local11:Number = local3 * param1.scaleY;
var local12:Number = local2 * param1.scaleY;
var local13:Number = local2 * param1.scaleZ;
var local14:Number = local3 * param1.scaleZ;
this.alternativa3d::ma = local6 * local10;
this.alternativa3d::mb = local8 * local11 - local7 * local12;
this.alternativa3d::mc = local8 * local13 + local7 * local14;
this.alternativa3d::md = param1.x;
this.alternativa3d::me = local7 * local10;
this.alternativa3d::mf = local9 * local11 + local6 * local12;
this.alternativa3d::mg = local9 * local13 - local6 * local14;
this.alternativa3d::mh = param1.y;
this.alternativa3d::mi = -local5 * param1.scaleX;
this.alternativa3d::mj = local4 * local11;
this.alternativa3d::mk = local4 * local13;
this.alternativa3d::ml = param1.z;
}
alternativa3d function appendMatrix(param1:Object3D) : void {
var local2:Number = this.alternativa3d::ma;
var local3:Number = this.alternativa3d::mb;
var local4:Number = this.alternativa3d::mc;
var local5:Number = this.alternativa3d::md;
var local6:Number = this.alternativa3d::me;
var local7:Number = this.alternativa3d::mf;
var local8:Number = this.alternativa3d::mg;
var local9:Number = this.alternativa3d::mh;
var local10:Number = this.alternativa3d::mi;
var local11:Number = this.alternativa3d::mj;
var local12:Number = this.alternativa3d::mk;
var local13:Number = this.alternativa3d::ml;
this.alternativa3d::ma = param1.alternativa3d::ma * local2 + param1.alternativa3d::mb * local6 + param1.alternativa3d::mc * local10;
this.alternativa3d::mb = param1.alternativa3d::ma * local3 + param1.alternativa3d::mb * local7 + param1.alternativa3d::mc * local11;
this.alternativa3d::mc = param1.alternativa3d::ma * local4 + param1.alternativa3d::mb * local8 + param1.alternativa3d::mc * local12;
this.alternativa3d::md = param1.alternativa3d::ma * local5 + param1.alternativa3d::mb * local9 + param1.alternativa3d::mc * local13 + param1.alternativa3d::md;
this.alternativa3d::me = param1.alternativa3d::me * local2 + param1.alternativa3d::mf * local6 + param1.alternativa3d::mg * local10;
this.alternativa3d::mf = param1.alternativa3d::me * local3 + param1.alternativa3d::mf * local7 + param1.alternativa3d::mg * local11;
this.alternativa3d::mg = param1.alternativa3d::me * local4 + param1.alternativa3d::mf * local8 + param1.alternativa3d::mg * local12;
this.alternativa3d::mh = param1.alternativa3d::me * local5 + param1.alternativa3d::mf * local9 + param1.alternativa3d::mg * local13 + param1.alternativa3d::mh;
this.alternativa3d::mi = param1.alternativa3d::mi * local2 + param1.alternativa3d::mj * local6 + param1.alternativa3d::mk * local10;
this.alternativa3d::mj = param1.alternativa3d::mi * local3 + param1.alternativa3d::mj * local7 + param1.alternativa3d::mk * local11;
this.alternativa3d::mk = param1.alternativa3d::mi * local4 + param1.alternativa3d::mj * local8 + param1.alternativa3d::mk * local12;
this.alternativa3d::ml = param1.alternativa3d::mi * local5 + param1.alternativa3d::mj * local9 + param1.alternativa3d::mk * local13 + param1.alternativa3d::ml;
}
alternativa3d function composeAndAppend(param1:Object3D) : void {
var local2:Number = Math.cos(this.rotationX);
var local3:Number = Math.sin(this.rotationX);
var local4:Number = Math.cos(this.rotationY);
var local5:Number = Math.sin(this.rotationY);
var local6:Number = Math.cos(this.rotationZ);
var local7:Number = Math.sin(this.rotationZ);
var local8:Number = local6 * local5;
var local9:Number = local7 * local5;
var local10:Number = local4 * this.scaleX;
var local11:Number = local3 * this.scaleY;
var local12:Number = local2 * this.scaleY;
var local13:Number = local2 * this.scaleZ;
var local14:Number = local3 * this.scaleZ;
var local15:Number = local6 * local10;
var local16:Number = local8 * local11 - local7 * local12;
var local17:Number = local8 * local13 + local7 * local14;
var local18:Number = this.x;
var local19:Number = local7 * local10;
var local20:Number = local9 * local11 + local6 * local12;
var local21:Number = local9 * local13 - local6 * local14;
var local22:Number = this.y;
var local23:Number = -local5 * this.scaleX;
var local24:Number = local4 * local11;
var local25:Number = local4 * local13;
var local26:Number = this.z;
this.alternativa3d::ma = param1.alternativa3d::ma * local15 + param1.alternativa3d::mb * local19 + param1.alternativa3d::mc * local23;
this.alternativa3d::mb = param1.alternativa3d::ma * local16 + param1.alternativa3d::mb * local20 + param1.alternativa3d::mc * local24;
this.alternativa3d::mc = param1.alternativa3d::ma * local17 + param1.alternativa3d::mb * local21 + param1.alternativa3d::mc * local25;
this.alternativa3d::md = param1.alternativa3d::ma * local18 + param1.alternativa3d::mb * local22 + param1.alternativa3d::mc * local26 + param1.alternativa3d::md;
this.alternativa3d::me = param1.alternativa3d::me * local15 + param1.alternativa3d::mf * local19 + param1.alternativa3d::mg * local23;
this.alternativa3d::mf = param1.alternativa3d::me * local16 + param1.alternativa3d::mf * local20 + param1.alternativa3d::mg * local24;
this.alternativa3d::mg = param1.alternativa3d::me * local17 + param1.alternativa3d::mf * local21 + param1.alternativa3d::mg * local25;
this.alternativa3d::mh = param1.alternativa3d::me * local18 + param1.alternativa3d::mf * local22 + param1.alternativa3d::mg * local26 + param1.alternativa3d::mh;
this.alternativa3d::mi = param1.alternativa3d::mi * local15 + param1.alternativa3d::mj * local19 + param1.alternativa3d::mk * local23;
this.alternativa3d::mj = param1.alternativa3d::mi * local16 + param1.alternativa3d::mj * local20 + param1.alternativa3d::mk * local24;
this.alternativa3d::mk = param1.alternativa3d::mi * local17 + param1.alternativa3d::mj * local21 + param1.alternativa3d::mk * local25;
this.alternativa3d::ml = param1.alternativa3d::mi * local18 + param1.alternativa3d::mj * local22 + param1.alternativa3d::mk * local26 + param1.alternativa3d::ml;
}
alternativa3d function invertMatrix() : void {
var local1:Number = this.alternativa3d::ma;
var local2:Number = this.alternativa3d::mb;
var local3:Number = this.alternativa3d::mc;
var local4:Number = this.alternativa3d::md;
var local5:Number = this.alternativa3d::me;
var local6:Number = this.alternativa3d::mf;
var local7:Number = this.alternativa3d::mg;
var local8:Number = this.alternativa3d::mh;
var local9:Number = this.alternativa3d::mi;
var local10:Number = this.alternativa3d::mj;
var local11:Number = this.alternativa3d::mk;
var local12:Number = this.alternativa3d::ml;
var local13:Number = 1 / (-local3 * local6 * local9 + local2 * local7 * local9 + local3 * local5 * local10 - local1 * local7 * local10 - local2 * local5 * local11 + local1 * local6 * local11);
this.alternativa3d::ma = (-local7 * local10 + local6 * local11) * local13;
this.alternativa3d::mb = (local3 * local10 - local2 * local11) * local13;
this.alternativa3d::mc = (-local3 * local6 + local2 * local7) * local13;
this.alternativa3d::md = (local4 * local7 * local10 - local3 * local8 * local10 - local4 * local6 * local11 + local2 * local8 * local11 + local3 * local6 * local12 - local2 * local7 * local12) * local13;
this.alternativa3d::me = (local7 * local9 - local5 * local11) * local13;
this.alternativa3d::mf = (-local3 * local9 + local1 * local11) * local13;
this.alternativa3d::mg = (local3 * local5 - local1 * local7) * local13;
this.alternativa3d::mh = (local3 * local8 * local9 - local4 * local7 * local9 + local4 * local5 * local11 - local1 * local8 * local11 - local3 * local5 * local12 + local1 * local7 * local12) * local13;
this.alternativa3d::mi = (-local6 * local9 + local5 * local10) * local13;
this.alternativa3d::mj = (local2 * local9 - local1 * local10) * local13;
this.alternativa3d::mk = (-local2 * local5 + local1 * local6) * local13;
this.alternativa3d::ml = (local4 * local6 * local9 - local2 * local8 * local9 - local4 * local5 * local10 + local1 * local8 * local10 + local2 * local5 * local12 - local1 * local6 * local12) * local13;
}
alternativa3d function calculateInverseMatrix() : void {
var local1:Number = 1 / (-this.alternativa3d::mc * this.alternativa3d::mf * this.alternativa3d::mi + this.alternativa3d::mb * this.alternativa3d::mg * this.alternativa3d::mi + this.alternativa3d::mc * this.alternativa3d::me * this.alternativa3d::mj - this.alternativa3d::ma * this.alternativa3d::mg * this.alternativa3d::mj - this.alternativa3d::mb * this.alternativa3d::me * this.alternativa3d::mk + this.alternativa3d::ma * this.alternativa3d::mf * this.alternativa3d::mk);
this.alternativa3d::ima = (-this.alternativa3d::mg * this.alternativa3d::mj + this.alternativa3d::mf * this.alternativa3d::mk) * local1;
this.alternativa3d::imb = (this.alternativa3d::mc * this.alternativa3d::mj - this.alternativa3d::mb * this.alternativa3d::mk) * local1;
this.alternativa3d::imc = (-this.alternativa3d::mc * this.alternativa3d::mf + this.alternativa3d::mb * this.alternativa3d::mg) * local1;
this.alternativa3d::imd = (this.alternativa3d::md * this.alternativa3d::mg * this.alternativa3d::mj - this.alternativa3d::mc * this.alternativa3d::mh * this.alternativa3d::mj - this.alternativa3d::md * this.alternativa3d::mf * this.alternativa3d::mk + this.alternativa3d::mb * this.alternativa3d::mh * this.alternativa3d::mk + this.alternativa3d::mc * this.alternativa3d::mf * this.alternativa3d::ml - this.alternativa3d::mb * this.alternativa3d::mg * this.alternativa3d::ml) * local1;
this.alternativa3d::ime = (this.alternativa3d::mg * this.alternativa3d::mi - this.alternativa3d::me * this.alternativa3d::mk) * local1;
this.alternativa3d::imf = (-this.alternativa3d::mc * this.alternativa3d::mi + this.alternativa3d::ma * this.alternativa3d::mk) * local1;
this.alternativa3d::img = (this.alternativa3d::mc * this.alternativa3d::me - this.alternativa3d::ma * this.alternativa3d::mg) * local1;
this.alternativa3d::imh = (this.alternativa3d::mc * this.alternativa3d::mh * this.alternativa3d::mi - this.alternativa3d::md * this.alternativa3d::mg * this.alternativa3d::mi + this.alternativa3d::md * this.alternativa3d::me * this.alternativa3d::mk - this.alternativa3d::ma * this.alternativa3d::mh * this.alternativa3d::mk - this.alternativa3d::mc * this.alternativa3d::me * this.alternativa3d::ml + this.alternativa3d::ma * this.alternativa3d::mg * this.alternativa3d::ml) * local1;
this.alternativa3d::imi = (-this.alternativa3d::mf * this.alternativa3d::mi + this.alternativa3d::me * this.alternativa3d::mj) * local1;
this.alternativa3d::imj = (this.alternativa3d::mb * this.alternativa3d::mi - this.alternativa3d::ma * this.alternativa3d::mj) * local1;
this.alternativa3d::imk = (-this.alternativa3d::mb * this.alternativa3d::me + this.alternativa3d::ma * this.alternativa3d::mf) * local1;
this.alternativa3d::iml = (this.alternativa3d::md * this.alternativa3d::mf * this.alternativa3d::mi - this.alternativa3d::mb * this.alternativa3d::mh * this.alternativa3d::mi - this.alternativa3d::md * this.alternativa3d::me * this.alternativa3d::mj + this.alternativa3d::ma * this.alternativa3d::mh * this.alternativa3d::mj + this.alternativa3d::mb * this.alternativa3d::me * this.alternativa3d::ml - this.alternativa3d::ma * this.alternativa3d::mf * this.alternativa3d::ml) * local1;
}
alternativa3d function cullingInCamera(param1:Camera3D, param2:int) : int {
var local4:Vertex = null;
var local5:Number = NaN;
var local6:Number = NaN;
var local7:Number = NaN;
var local8:Boolean = false;
var local9:Boolean = false;
var local10:Number = NaN;
var local11:Number = NaN;
var local12:int = 0;
var local13:Vertex = null;
if(param1.alternativa3d::occludedAll) {
return -1;
}
var local3:int = int(param1.alternativa3d::numOccluders);
if(param2 > 0 || local3 > 0) {
local4 = alternativa3d::boundVertexList;
local4.x = this.boundMinX;
local4.y = this.boundMinY;
local4.z = this.boundMinZ;
local4 = local4.alternativa3d::next;
local4.x = this.boundMaxX;
local4.y = this.boundMinY;
local4.z = this.boundMinZ;
local4 = local4.alternativa3d::next;
local4.x = this.boundMinX;
local4.y = this.boundMaxY;
local4.z = this.boundMinZ;
local4 = local4.alternativa3d::next;
local4.x = this.boundMaxX;
local4.y = this.boundMaxY;
local4.z = this.boundMinZ;
local4 = local4.alternativa3d::next;
local4.x = this.boundMinX;
local4.y = this.boundMinY;
local4.z = this.boundMaxZ;
local4 = local4.alternativa3d::next;
local4.x = this.boundMaxX;
local4.y = this.boundMinY;
local4.z = this.boundMaxZ;
local4 = local4.alternativa3d::next;
local4.x = this.boundMinX;
local4.y = this.boundMaxY;
local4.z = this.boundMaxZ;
local4 = local4.alternativa3d::next;
local4.x = this.boundMaxX;
local4.y = this.boundMaxY;
local4.z = this.boundMaxZ;
local4 = alternativa3d::boundVertexList;
while(local4 != null) {
local5 = local4.x;
local6 = local4.y;
local7 = local4.z;
local4.alternativa3d::cameraX = this.alternativa3d::ma * local5 + this.alternativa3d::mb * local6 + this.alternativa3d::mc * local7 + this.alternativa3d::md;
local4.alternativa3d::cameraY = this.alternativa3d::me * local5 + this.alternativa3d::mf * local6 + this.alternativa3d::mg * local7 + this.alternativa3d::mh;
local4.alternativa3d::cameraZ = this.alternativa3d::mi * local5 + this.alternativa3d::mj * local6 + this.alternativa3d::mk * local7 + this.alternativa3d::ml;
local4 = local4.alternativa3d::next;
}
}
if(param2 > 0) {
if(Boolean(param2 & 1)) {
local10 = param1.nearClipping;
local4 = alternativa3d::boundVertexList;
local8 = false;
local9 = false;
while(local4 != null) {
if(local4.alternativa3d::cameraZ > local10) {
local8 = true;
if(local9) {
break;
}
} else {
local9 = true;
if(local8) {
break;
}
}
local4 = local4.alternativa3d::next;
}
if(local9) {
if(!local8) {
return -1;
}
} else {
param2 &= 62;
}
}
if(Boolean(param2 & 2)) {
local11 = param1.farClipping;
local4 = alternativa3d::boundVertexList;
local8 = false;
local9 = false;
while(local4 != null) {
if(local4.alternativa3d::cameraZ < local11) {
local8 = true;
if(local9) {
break;
}
} else {
local9 = true;
if(local8) {
break;
}
}
local4 = local4.alternativa3d::next;
}
if(local9) {
if(!local8) {
return -1;
}
} else {
param2 &= 61;
}
}
if(Boolean(param2 & 4)) {
local4 = alternativa3d::boundVertexList;
local8 = false;
local9 = false;
while(local4 != null) {
if(-local4.alternativa3d::cameraX < local4.alternativa3d::cameraZ) {
local8 = true;
if(local9) {
break;
}
} else {
local9 = true;
if(local8) {
break;
}
}
local4 = local4.alternativa3d::next;
}
if(local9) {
if(!local8) {
return -1;
}
} else {
param2 &= 59;
}
}
if(Boolean(param2 & 8)) {
local4 = alternativa3d::boundVertexList;
local8 = false;
local9 = false;
while(local4 != null) {
if(local4.alternativa3d::cameraX < local4.alternativa3d::cameraZ) {
local8 = true;
if(local9) {
break;
}
} else {
local9 = true;
if(local8) {
break;
}
}
local4 = local4.alternativa3d::next;
}
if(local9) {
if(!local8) {
return -1;
}
} else {
param2 &= 55;
}
}
if(Boolean(param2 & 0x10)) {
local4 = alternativa3d::boundVertexList;
local8 = false;
local9 = false;
while(local4 != null) {
if(-local4.alternativa3d::cameraY < local4.alternativa3d::cameraZ) {
local8 = true;
if(local9) {
break;
}
} else {
local9 = true;
if(local8) {
break;
}
}
local4 = local4.alternativa3d::next;
}
if(local9) {
if(!local8) {
return -1;
}
} else {
param2 &= 47;
}
}
if(Boolean(param2 & 0x20)) {
local4 = alternativa3d::boundVertexList;
local8 = false;
local9 = false;
while(local4 != null) {
if(local4.alternativa3d::cameraY < local4.alternativa3d::cameraZ) {
local8 = true;
if(local9) {
break;
}
} else {
local9 = true;
if(local8) {
break;
}
}
local4 = local4.alternativa3d::next;
}
if(local9) {
if(!local8) {
return -1;
}
} else {
param2 &= 31;
}
}
}
if(local3 > 0) {
local12 = 0;
while(true) {
if(local12 < local3) {
local13 = param1.alternativa3d::occluders[local12];
while(local13 != null) {
local4 = alternativa3d::boundVertexList;
while(local4 != null) {
if(local13.alternativa3d::cameraX * local4.alternativa3d::cameraX + local13.alternativa3d::cameraY * local4.alternativa3d::cameraY + local13.alternativa3d::cameraZ * local4.alternativa3d::cameraZ >= 0) {
break;
}
local4 = local4.alternativa3d::next;
}
if(local4 != null) {
break;
}
local13 = local13.alternativa3d::next;
}
if(local13 == null) {
break;
}
local12++;
continue;
}
}
return -1;
}
this.alternativa3d::culling = param2;
return param2;
}
alternativa3d function removeFromParent() : void {
if(this.alternativa3d::_parent != null) {
this.alternativa3d::_parent.removeChild(this);
}
}
}
}
|
package alternativa.tanks.battle.events {
public class ControlMiniHelpCloseEvent {
public function ControlMiniHelpCloseEvent() {
super();
}
}
}
|
package alternativa.tanks.models.battle.facilities {
import alternativa.math.Vector3;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
[ModelInterface]
public interface ICommonFacility {
function getPosition() : Vector3;
function getCenter() : Vector3;
function getTeam() : BattleTeam;
function getOwner() : IGameObject;
}
}
|
package _codec.platform.client.models.commons.description {
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.models.commons.description.DescriptionModelCC;
public class CodecDescriptionModelCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_description:ICodec;
private var codec_name:ICodec;
public function CodecDescriptionModelCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_description = param1.getCodec(new TypeCodecInfo(String,true));
this.codec_name = param1.getCodec(new TypeCodecInfo(String,true));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:DescriptionModelCC = new DescriptionModelCC();
local2.description = this.codec_description.decode(param1) as String;
local2.name = this.codec_name.decode(param1) as String;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:DescriptionModelCC = DescriptionModelCC(param2);
this.codec_description.encode(param1,local3.description);
this.codec_name.encode(param1,local3.name);
}
}
}
|
package projects.tanks.clients.fp10.Prelauncher.controls.background {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/projects.tanks.clients.fp10.Prelauncher.controls.background.Background_background.png")]
public class Background_background extends BitmapAsset {
public function Background_background() {
super();
}
}
}
|
package projects.tanks.client.entrance.model.entrance.logging {
public class RegistrationUXFormAction {
public static const CORRECT_PASSWORD_TYPED:RegistrationUXFormAction = new RegistrationUXFormAction(0,"CORRECT_PASSWORD_TYPED");
public static const CORRECT_PASSWORD_CONFIRMATION_TYPED:RegistrationUXFormAction = new RegistrationUXFormAction(1,"CORRECT_PASSWORD_CONFIRMATION_TYPED");
public static const CORRECT_USERNAME_TYPED:RegistrationUXFormAction = new RegistrationUXFormAction(2,"CORRECT_USERNAME_TYPED");
public static const BUSY_USERNAME_TYPED:RegistrationUXFormAction = new RegistrationUXFormAction(3,"BUSY_USERNAME_TYPED");
public static const FORBIDDEN_USERNAME_TYPED:RegistrationUXFormAction = new RegistrationUXFormAction(4,"FORBIDDEN_USERNAME_TYPED");
public static const FORBIDDEN_CHARACTERS_TYPED:RegistrationUXFormAction = new RegistrationUXFormAction(5,"FORBIDDEN_CHARACTERS_TYPED");
public static const FORBIDDEN_LETTERS_TYPED:RegistrationUXFormAction = new RegistrationUXFormAction(6,"FORBIDDEN_LETTERS_TYPED");
public static const USERNAME_OFFER_ACCEPTED:RegistrationUXFormAction = new RegistrationUXFormAction(7,"USERNAME_OFFER_ACCEPTED");
public static const SOCIAL_BUTTON_CLICKED:RegistrationUXFormAction = new RegistrationUXFormAction(8,"SOCIAL_BUTTON_CLICKED");
public static const USER_AGREEMENT_ACCEPTED:RegistrationUXFormAction = new RegistrationUXFormAction(9,"USER_AGREEMENT_ACCEPTED");
private var _value:int;
private var _name:String;
public function RegistrationUXFormAction(param1:int, param2:String) {
super();
this._value = param1;
this._name = param2;
}
public static function get values() : Vector.<RegistrationUXFormAction> {
var local1:Vector.<RegistrationUXFormAction> = new Vector.<RegistrationUXFormAction>();
local1.push(CORRECT_PASSWORD_TYPED);
local1.push(CORRECT_PASSWORD_CONFIRMATION_TYPED);
local1.push(CORRECT_USERNAME_TYPED);
local1.push(BUSY_USERNAME_TYPED);
local1.push(FORBIDDEN_USERNAME_TYPED);
local1.push(FORBIDDEN_CHARACTERS_TYPED);
local1.push(FORBIDDEN_LETTERS_TYPED);
local1.push(USERNAME_OFFER_ACCEPTED);
local1.push(SOCIAL_BUTTON_CLICKED);
local1.push(USER_AGREEMENT_ACCEPTED);
return local1;
}
public function toString() : String {
return "RegistrationUXFormAction [" + this._name + "]";
}
public function get value() : int {
return this._value;
}
public function get name() : String {
return this._name;
}
}
}
|
package alternativa.tanks.model.item.discount {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IDiscountAdapt implements IDiscount {
private var object:IGameObject;
private var impl:IDiscount;
public function IDiscountAdapt(param1:IGameObject, param2:IDiscount) {
super();
this.object = param1;
this.impl = param2;
}
public function getDiscountInPercent() : int {
var result:int = 0;
try {
Model.object = this.object;
result = int(this.impl.getDiscountInPercent());
}
finally {
Model.popObject();
}
return result;
}
public function applyDiscount(param1:int) : int {
var result:int = 0;
var price:int = param1;
try {
Model.object = this.object;
result = int(this.impl.applyDiscount(price));
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.models.tank.rankup {
import alternativa.tanks.models.battle.battlefield.BattleUserInfoListener;
import alternativa.tanks.models.battle.battlefield.BattleUserInfoService;
import alternativa.types.Long;
import platform.client.fp10.core.type.AutoClosable;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class RankChangeListener implements BattleUserInfoListener, AutoClosable {
[Inject]
public static var battleUserInfoService:BattleUserInfoService;
private var space:ISpace;
public function RankChangeListener(param1:ISpace) {
super();
this.space = param1;
battleUserInfoService.addBattleUserInfoListener(this);
}
public function userRankChanged(param1:Long, param2:int) : void {
var local3:IGameObject = this.space.getObject(param1);
var local4:ITankRankUpEffectModel = ITankRankUpEffectModel(local3.adapt(ITankRankUpEffectModel));
local4.showRankUpEffect(param2);
}
[Obfuscation(rename="false")]
public function close() : void {
this.space = null;
battleUserInfoService.removeBattleUserInfoListener(this);
}
public function userInfoChanged(param1:Long, param2:String, param3:int, param4:Boolean) : void {
}
public function userSuspiciousnessChanged(param1:Long, param2:Boolean) : void {
}
}
}
|
package alternativa.tanks.service.socialnetwork.vk {
import flash.events.EventDispatcher;
import flash.external.ExternalInterface;
import flash.system.Security;
import platform.clients.fp10.libraries.alternativapartners.service.IPartnerService;
public class SNFriendsServiceImpl extends EventDispatcher implements SNFriendsService {
[Inject]
public static var partnerService:IPartnerService;
public function SNFriendsServiceImpl() {
super();
}
public function requestFriends() : void {
if(!partnerService.isRunningInsidePartnerEnvironment()) {
return;
}
this.requestFriend();
}
private function requestFriend() : void {
if(ExternalInterface.available) {
Security.allowDomain("*");
ExternalInterface.addCallback("onReceiveFriendsList",this.onReceiveFriendsList);
ExternalInterface.call("getFriendsInApp");
}
}
private function onReceiveFriendsList(param1:String) : void {
dispatchEvent(new SNFriendsServiceEvent(new SNFriendsServiceData(param1)));
}
}
}
|
package forms {
public class Styles {
public static const TEXT_FORMAT:String = "textFormat";
public static const EMBED_FONTS:String = "embedFonts";
public static const UP_SKIN:String = "upSkin";
public static const DOWN_SKIN:String = "downSkin";
public static const OVER_SKIN:String = "overSkin";
public static const SELECTED_UP_SKIN:String = "selectedUpSkin";
public static const SELECTED_DOWN_SKIN:String = "selectedDownSkin";
public static const SELECTED_OVER_SKIN:String = "selectedOverSkin";
public static const CELL_RENDERER:String = "cellRenderer";
public static const ICON:String = "icon";
public function Styles() {
super();
}
}
}
|
package alternativa.tanks.servermodels.telegram {
import projects.tanks.client.entrance.model.entrance.telegram.ITelegramEntranceModelBase;
import projects.tanks.client.entrance.model.entrance.telegram.TelegramEntranceModelBase;
[ModelInfo]
public class TelegramEntranceModel extends TelegramEntranceModelBase implements ITelegramEntranceModelBase {
public function TelegramEntranceModel() {
super();
}
}
}
|
package projects.tanks.client.panel.model.payment.modes {
import platform.client.fp10.core.resource.types.ImageResource;
public class PayModeCC {
private var _customManualDescription:String;
private var _description:String;
private var _image:ImageResource;
private var _name:String;
private var _order:int;
public function PayModeCC(param1:String = null, param2:String = null, param3:ImageResource = null, param4:String = null, param5:int = 0) {
super();
this._customManualDescription = param1;
this._description = param2;
this._image = param3;
this._name = param4;
this._order = param5;
}
public function get customManualDescription() : String {
return this._customManualDescription;
}
public function set customManualDescription(param1:String) : void {
this._customManualDescription = param1;
}
public function get description() : String {
return this._description;
}
public function set description(param1:String) : void {
this._description = param1;
}
public function get image() : ImageResource {
return this._image;
}
public function set image(param1:ImageResource) : void {
this._image = param1;
}
public function get name() : String {
return this._name;
}
public function set name(param1:String) : void {
this._name = param1;
}
public function get order() : int {
return this._order;
}
public function set order(param1:int) : void {
this._order = param1;
}
public function toString() : String {
var local1:String = "PayModeCC [";
local1 += "customManualDescription = " + this.customManualDescription + " ";
local1 += "description = " + this.description + " ";
local1 += "image = " + this.image + " ";
local1 += "name = " + this.name + " ";
local1 += "order = " + this.order + " ";
return local1 + "]";
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapSmallRank02.png")]
public class DefaultRanksBitmaps_bitmapSmallRank02 extends BitmapAsset {
public function DefaultRanksBitmaps_bitmapSmallRank02() {
super();
}
}
}
|
package alternativa.tanks.models.battle.rugby.explosion {
import alternativa.math.Vector3;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class BallExplosionAdapt implements BallExplosion {
private var object:IGameObject;
private var impl:BallExplosion;
public function BallExplosionAdapt(param1:IGameObject, param2:BallExplosion) {
super();
this.object = param1;
this.impl = param2;
}
public function createExplosionEffects(param1:Vector3) : void {
var position:Vector3 = param1;
try {
Model.object = this.object;
this.impl.createExplosionEffects(position);
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.models.clan.membersdata {
import alternativa.types.Long;
import projects.tanks.client.clans.clan.clanmembersdata.UserData;
import projects.tanks.client.clans.clan.permissions.ClanPermission;
public interface ClanMembersDataService {
function getKills(param1:Long) : int;
function getScore(param1:Long) : int;
function getDeaths(param1:Long) : int;
function getKillDeathRatio(param1:Long) : Number;
function getDateInClanInSec(param1:Long) : int;
function getPermission(param1:Long) : ClanPermission;
function setData(param1:UserData) : void;
function getLastVisitDateInSec(param1:Long) : Long;
function getClanMemberData(param1:Long) : Object;
}
}
|
package alternativa.engine3d.loaders.collada {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.objects.Mesh;
use namespace collada;
use namespace alternativa3d;
use namespace daeAlternativa3DMesh;
public class DaeGeometry extends DaeElement {
private var primitives:Vector.<DaePrimitive>;
private var vertices:DaeVertices;
public function DaeGeometry(param1:XML, param2:DaeDocument) {
super(param1,param2);
this.constructVertices();
}
private function constructVertices() : void {
var local1:XML = data.mesh.vertices[0];
if(local1 != null) {
this.vertices = new DaeVertices(local1,document);
document.vertices[this.vertices.id] = this.vertices;
}
}
override protected function parseImplementation() : Boolean {
if(this.vertices != null) {
return this.parsePrimitives();
}
return false;
}
private function parsePrimitives() : Boolean {
var local4:XML = null;
this.primitives = new Vector.<DaePrimitive>();
var local1:XMLList = data.mesh.children();
var local2:int = 0;
var local3:int = int(local1.length());
while(local2 < local3) {
local4 = local1[local2];
switch(local4.localName()) {
case "polygons":
case "polylist":
case "triangles":
case "trifans":
case "tristrips":
this.primitives.push(new DaePrimitive(local4,document));
break;
}
local2++;
}
return true;
}
public function parseMesh(param1:Object) : Mesh {
var local2:Mesh = null;
if(data.mesh.length() > 0) {
local2 = new Mesh();
this.fillInMesh(local2,param1);
this.cleanVertices(local2);
local2.calculateFacesNormals(true);
local2.calculateBounds();
return local2;
}
return null;
}
public function fillInMesh(param1:Mesh, param2:Object) : Vector.<Vertex> {
var local6:DaePrimitive = null;
this.vertices.parse();
var local3:Vector.<Vertex> = this.vertices.fillInMesh(param1);
var local4:int = 0;
var local5:int = int(this.primitives.length);
while(local4 < local5) {
local6 = this.primitives[local4];
local6.parse();
if(local6.verticesEquals(this.vertices)) {
local6.fillInMesh(param1,local3,param2[local6.materialSymbol]);
}
local4++;
}
return local3;
}
public function cleanVertices(param1:Mesh) : void {
var local2:Vertex = param1.alternativa3d::vertexList;
while(local2 != null) {
local2.alternativa3d::index = 0;
local2.alternativa3d::value = null;
local2 = local2.alternativa3d::next;
}
}
}
}
|
package alternativa.physics.collision {
import alternativa.physics.collision.types.AABB;
public class CollisionKdTree2D {
private static const nodeBoundBoxThreshold:AABB = new AABB();
private static const splitCoordsX:Vector.<Number> = new Vector.<Number>();
private static const splitCoordsY:Vector.<Number> = new Vector.<Number>();
private static const splitCoordsZ:Vector.<Number> = new Vector.<Number>();
private static const _nodeBB:Vector.<Number> = new Vector.<Number>(6);
private static const _bb:Vector.<Number> = new Vector.<Number>(6);
public var threshold:Number = 0.1;
public var minPrimitivesPerNode:int = 1;
public var parentTree:CollisionKdTree;
public var parentNode:CollisionKdNode;
public var rootNode:CollisionKdNode;
private var splitAxis:int;
private var splitCost:Number;
private var splitCoord:Number;
public function CollisionKdTree2D(param1:CollisionKdTree, param2:CollisionKdNode) {
super();
this.parentTree = param1;
this.parentNode = param2;
}
public function createTree() : void {
this.rootNode = new CollisionKdNode();
this.rootNode.boundBox = this.parentNode.boundBox.clone();
this.rootNode.indices = new Vector.<int>();
var local1:int = int(this.parentNode.splitIndices.length);
var local2:int = 0;
while(local2 < local1) {
this.rootNode.indices[local2] = this.parentNode.splitIndices[local2];
local2++;
}
this.splitNode(this.rootNode);
splitCoordsX.length = splitCoordsY.length = splitCoordsZ.length = 0;
}
private function splitNode(param1:CollisionKdNode) : void {
var local2:Vector.<int> = null;
var local3:int = 0;
var local4:int = 0;
var local5:AABB = null;
var local8:int = 0;
var local9:int = 0;
var local10:int = 0;
var local16:AABB = null;
var local17:Number = NaN;
var local18:Number = NaN;
if(param1.indices.length <= this.minPrimitivesPerNode) {
return;
}
local2 = param1.indices;
local5 = param1.boundBox;
nodeBoundBoxThreshold.minX = local5.minX + this.threshold;
nodeBoundBoxThreshold.minY = local5.minY + this.threshold;
nodeBoundBoxThreshold.minZ = local5.minZ + this.threshold;
nodeBoundBoxThreshold.maxX = local5.maxX - this.threshold;
nodeBoundBoxThreshold.maxY = local5.maxY - this.threshold;
nodeBoundBoxThreshold.maxZ = local5.maxZ - this.threshold;
var local6:Number = this.threshold * 2;
var local7:Vector.<AABB> = this.parentTree.staticBoundBoxes;
var local11:int = int(local2.length);
local3 = 0;
while(local3 < local11) {
local16 = local7[local2[local3]];
if(this.parentNode.axis != 0) {
if(local16.minX > nodeBoundBoxThreshold.minX) {
var local19:* = local8++;
splitCoordsX[local19] = local16.minX;
}
if(local16.maxX < nodeBoundBoxThreshold.maxX) {
local19 = local8++;
splitCoordsX[local19] = local16.maxX;
}
}
if(this.parentNode.axis != 1) {
if(local16.minY > nodeBoundBoxThreshold.minY) {
local19 = local9++;
splitCoordsY[local19] = local16.minY;
}
if(local16.maxY < nodeBoundBoxThreshold.maxY) {
local19 = local9++;
splitCoordsY[local19] = local16.maxY;
}
}
if(this.parentNode.axis != 2) {
if(local16.minZ > nodeBoundBoxThreshold.minZ) {
local19 = local10++;
splitCoordsZ[local19] = local16.minZ;
}
if(local16.maxZ < nodeBoundBoxThreshold.maxZ) {
local19 = local10++;
splitCoordsZ[local19] = local16.maxZ;
}
}
local3++;
}
this.splitAxis = -1;
this.splitCost = 1e+308;
_nodeBB[0] = local5.minX;
_nodeBB[1] = local5.minY;
_nodeBB[2] = local5.minZ;
_nodeBB[3] = local5.maxX;
_nodeBB[4] = local5.maxY;
_nodeBB[5] = local5.maxZ;
if(this.parentNode.axis != 0) {
this.checkNodeAxis(param1,0,local8,splitCoordsX,_nodeBB);
}
if(this.parentNode.axis != 1) {
this.checkNodeAxis(param1,1,local9,splitCoordsY,_nodeBB);
}
if(this.parentNode.axis != 2) {
this.checkNodeAxis(param1,2,local10,splitCoordsZ,_nodeBB);
}
if(this.splitAxis < 0) {
return;
}
var local12:Boolean = this.splitAxis == 0;
var local13:Boolean = this.splitAxis == 1;
param1.axis = this.splitAxis;
param1.coord = this.splitCoord;
param1.negativeNode = new CollisionKdNode();
param1.negativeNode.parent = param1;
param1.negativeNode.boundBox = local5.clone();
param1.positiveNode = new CollisionKdNode();
param1.positiveNode.parent = param1;
param1.positiveNode.boundBox = local5.clone();
if(local12) {
param1.negativeNode.boundBox.maxX = param1.positiveNode.boundBox.minX = this.splitCoord;
} else if(local13) {
param1.negativeNode.boundBox.maxY = param1.positiveNode.boundBox.minY = this.splitCoord;
} else {
param1.negativeNode.boundBox.maxZ = param1.positiveNode.boundBox.minZ = this.splitCoord;
}
var local14:Number = this.splitCoord - this.threshold;
var local15:Number = this.splitCoord + this.threshold;
local3 = 0;
while(local3 < local11) {
local16 = local7[local2[local3]];
local17 = local12 ? local16.minX : (local13 ? local16.minY : local16.minZ);
local18 = local12 ? local16.maxX : (local13 ? local16.maxY : local16.maxZ);
if(local18 <= local15) {
if(local17 < local14) {
if(param1.negativeNode.indices == null) {
param1.negativeNode.indices = new Vector.<int>();
}
param1.negativeNode.indices.push(local2[local3]);
local2[local3] = -1;
}
} else if(local17 >= local14) {
if(local18 > local15) {
if(param1.positiveNode.indices == null) {
param1.positiveNode.indices = new Vector.<int>();
}
param1.positiveNode.indices.push(local2[local3]);
local2[local3] = -1;
}
}
local3++;
}
local3 = 0;
local4 = 0;
while(local3 < local11) {
if(local2[local3] >= 0) {
local19 = local4++;
local2[local19] = local2[local3];
}
local3++;
}
if(local4 > 0) {
local2.length = local4;
} else {
param1.indices = null;
}
if(param1.negativeNode.indices != null) {
this.splitNode(param1.negativeNode);
}
if(param1.positiveNode.indices != null) {
this.splitNode(param1.positiveNode);
}
}
private function checkNodeAxis(param1:CollisionKdNode, param2:int, param3:int, param4:Vector.<Number>, param5:Vector.<Number>) : void {
var local11:Number = NaN;
var local12:Number = NaN;
var local13:Number = NaN;
var local14:Number = NaN;
var local15:Number = NaN;
var local16:int = 0;
var local17:int = 0;
var local18:Boolean = false;
var local19:int = 0;
var local20:int = 0;
var local21:Number = NaN;
var local22:AABB = null;
var local6:int = (param2 + 1) % 3;
var local7:int = (param2 + 2) % 3;
var local8:Number = (param5[local6 + 3] - param5[local6]) * (param5[local7 + 3] - param5[local7]);
var local9:Vector.<AABB> = this.parentTree.staticBoundBoxes;
var local10:int = 0;
while(local10 < param3) {
local11 = param4[local10];
if(!isNaN(local11)) {
local12 = local11 - this.threshold;
local13 = local11 + this.threshold;
local14 = local8 * (local11 - param5[param2]);
local15 = local8 * (param5[int(param2 + 3)] - local11);
local16 = 0;
local17 = 0;
local18 = false;
local19 = int(param1.indices.length);
local20 = 0;
while(local20 < local19) {
local22 = local9[param1.indices[local20]];
_bb[0] = local22.minX;
_bb[1] = local22.minY;
_bb[2] = local22.minZ;
_bb[3] = local22.maxX;
_bb[4] = local22.maxY;
_bb[5] = local22.maxZ;
if(_bb[param2 + 3] <= local13) {
if(_bb[param2] < local12) {
local16++;
}
} else {
if(_bb[param2] < local12) {
local18 = true;
break;
}
local17++;
}
local20++;
}
local21 = local14 * local16 + local15 * local17;
if(!local18 && local21 < this.splitCost && local16 > 0 && local17 > 0) {
this.splitAxis = param2;
this.splitCost = local21;
this.splitCoord = local11;
}
local20 = local10 + 1;
while(local20 < param3) {
if(param4[local20] >= local11 - this.threshold && param4[local20] <= local11 + this.threshold) {
param4[local20] = NaN;
}
local20++;
}
}
local10++;
}
}
public function destroyTree() : void {
this.parentTree = null;
this.parentNode = null;
if(Boolean(this.rootNode)) {
this.rootNode.destroy();
this.rootNode = null;
}
}
}
}
|
package _codec.projects.tanks.client.panel.model.shop.androidspecialoffer.banner {
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.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import platform.client.fp10.core.resource.types.ImageResource;
import projects.tanks.client.panel.model.shop.androidspecialoffer.banner.AndroidBannerModelCC;
import projects.tanks.client.panel.model.shop.androidspecialoffer.banner.AndroidBannerType;
public class CodecAndroidBannerModelCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_buttonIcon:ICodec;
private var codec_cooldownTimeInHour:ICodec;
private var codec_order:ICodec;
private var codec_type:ICodec;
public function CodecAndroidBannerModelCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_buttonIcon = param1.getCodec(new TypeCodecInfo(ImageResource,true));
this.codec_cooldownTimeInHour = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_order = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_type = param1.getCodec(new EnumCodecInfo(AndroidBannerType,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:AndroidBannerModelCC = new AndroidBannerModelCC();
local2.buttonIcon = this.codec_buttonIcon.decode(param1) as ImageResource;
local2.cooldownTimeInHour = this.codec_cooldownTimeInHour.decode(param1) as int;
local2.order = this.codec_order.decode(param1) as int;
local2.type = this.codec_type.decode(param1) as AndroidBannerType;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:AndroidBannerModelCC = AndroidBannerModelCC(param2);
this.codec_buttonIcon.encode(param1,local3.buttonIcon);
this.codec_cooldownTimeInHour.encode(param1,local3.cooldownTimeInHour);
this.codec_order.encode(param1,local3.order);
this.codec_type.encode(param1,local3.type);
}
}
}
|
package com.lorentz.SVG.drawing
{
import com.lorentz.SVG.utils.ArcUtils;
import com.lorentz.SVG.utils.Bezier;
import com.lorentz.SVG.utils.FlashPlayerUtils;
import flash.display.Graphics;
import flash.geom.Point;
public class GraphicsDrawer implements IDrawer
{
private var _graphics:Graphics;
private var _penX:Number = 0;
public function get penX():Number {
return _penX;
}
private var _penY:Number = 0;
public function get penY():Number {
return _penY;
}
public function GraphicsDrawer(graphics:Graphics)
{
_graphics = graphics;
}
public function moveTo(x:Number, y:Number):void
{
_graphics.moveTo(x, y);
_penX = x; _penY = y;
}
public function lineTo(x:Number, y:Number):void
{
_graphics.lineTo(x, y);
_penX = x; _penY = y;
}
public function curveTo(cx:Number, cy:Number, x:Number, y:Number):void
{
_graphics.curveTo(cx, cy, x, y);
_penX = x; _penY = y;
}
public function cubicCurveTo(cx1:Number, cy1:Number, cx2:Number, cy2:Number, x:Number, y:Number):void
{
if(FlashPlayerUtils.supportsCubicCurves)
{
_graphics["cubicCurveTo"](cx1, cy1, cx2, cy2, x, y);
_penX = x; _penY = y;
} else {
//Convert cubic curve to quadratic curves
var anchor1:Point = new Point(_penX, _penY);
var control1:Point = new Point(cx1, cy1);
var control2:Point = new Point(cx2, cy2);
var anchor2:Point = new Point(x, y);
var bezier:Bezier = new Bezier(anchor1, control1, control2, anchor2);
for each (var quadP:Object in bezier.QPts)
curveTo(quadP.c.x, quadP.c.y, quadP.p.x, quadP.p.y);
}
}
public function arcTo(rx:Number, ry:Number, angle:Number, largeArcFlag:Boolean, sweepFlag:Boolean, x:Number, y:Number):void
{
var ellipticalArc:Object = ArcUtils.computeSvgArc(rx, ry, angle, largeArcFlag, sweepFlag, x, y, _penX, _penY);
var curves:Array = ArcUtils.convertToCurves(ellipticalArc.cx, ellipticalArc.cy, ellipticalArc.startAngle, ellipticalArc.arc, ellipticalArc.radius, ellipticalArc.yRadius, ellipticalArc.xAxisRotation);
for (var i:int = 0; i<curves.length; i++)
curveTo(curves[i].c.x, curves[i].c.y, curves[i].p.x, curves[i].p.y);
}
}
} |
package alternativa.tanks.models.weapon.twins {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ITwinsSFXModelEvents implements ITwinsSFXModel {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function ITwinsSFXModelEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getPlasmaWeaponEffects() : TwinsEffects {
var result:TwinsEffects = null;
var i:int = 0;
var m:ITwinsSFXModel = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ITwinsSFXModel(this.impl[i]);
result = m.getPlasmaWeaponEffects();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function getSFXData() : TwinsSFXData {
var result:TwinsSFXData = null;
var i:int = 0;
var m:ITwinsSFXModel = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ITwinsSFXModel(this.impl[i]);
result = m.getSFXData();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.panel.model.referrals.notification {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class NewReferralsNotifierModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _requestNewReferralsCountId:Long = Long.getLong(839747887,-1366082134);
private var _resetNewReferralsCountId:Long = Long.getLong(417990658,1125452522);
private var model:IModel;
public function NewReferralsNotifierModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
public function requestNewReferralsCount() : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._requestNewReferralsCountId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
public function resetNewReferralsCount() : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._resetNewReferralsCountId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package platform.client.fp10.core.service.clientparam {
import flash.external.ExternalInterface;
import flash.system.Capabilities;
import flash.utils.Dictionary;
public class ClientParamUtil {
public function ClientParamUtil() {
super();
}
public static function collectClientParams() : Dictionary {
var local1:Dictionary = new Dictionary();
var local2:Array = Capabilities.version.split(" ");
if(local2.length === 2) {
local1[ClientParamEnum.OS] = local2[0];
local1[ClientParamEnum.FLASH_PLAYER_VERSION] = local2[1];
}
local1[ClientParamEnum.FLASH_PLAYER_TYPE] = Capabilities.playerType;
if(ExternalInterface.available) {
local1[ClientParamEnum.BROWSER_USER_AGENT] = ExternalInterface.call("window.navigator.userAgent.toString").replace(/;/gi,",");
}
return local1;
}
}
}
|
package alternativa.engine3d.core {
import alternativa.engine3d.alternativa3d;
use namespace alternativa3d;
public class Vertex {
alternativa3d static var collector:Vertex;
public var x:Number = 0;
public var y:Number = 0;
public var z:Number = 0;
public var u:Number = 0;
public var v:Number = 0;
public var normalX:Number;
public var normalY:Number;
public var normalZ:Number;
alternativa3d var cameraX:Number;
alternativa3d var cameraY:Number;
alternativa3d var cameraZ:Number;
alternativa3d var offset:Number;
alternativa3d var transformId:int = 0;
alternativa3d var drawId:int = 0;
alternativa3d var index:int;
alternativa3d var next:Vertex;
alternativa3d var value:Vertex;
public var id:Object;
public function Vertex() {
super();
}
alternativa3d static function createList(param1:int) : Vertex {
var local3:Vertex = null;
var local2:Vertex = alternativa3d::collector;
if(local2 != null) {
local3 = local2;
while(param1 > 1) {
local3.alternativa3d::transformId = 0;
local3.alternativa3d::drawId = 0;
if(local3.alternativa3d::next == null) {
while(param1 > 1) {
local3.alternativa3d::next = new Vertex();
local3 = local3.alternativa3d::next;
param1--;
}
break;
}
local3 = local3.alternativa3d::next;
param1--;
}
alternativa3d::collector = local3.alternativa3d::next;
local3.alternativa3d::transformId = 0;
local3.alternativa3d::drawId = 0;
local3.alternativa3d::next = null;
} else {
local2 = new Vertex();
local3 = local2;
while(param1 > 1) {
local3.alternativa3d::next = new Vertex();
local3 = local3.alternativa3d::next;
param1--;
}
}
return local2;
}
alternativa3d function create() : Vertex {
var local1:Vertex = null;
if(alternativa3d::collector != null) {
local1 = alternativa3d::collector;
alternativa3d::collector = local1.alternativa3d::next;
local1.alternativa3d::next = null;
local1.alternativa3d::transformId = 0;
local1.alternativa3d::drawId = 0;
return local1;
}
return new Vertex();
}
public function toString() : String {
return "[Vertex " + this.id + " " + this.x.toFixed(2) + ", " + this.y.toFixed(2) + ", " + this.z.toFixed(2) + ", " + this.u.toFixed(3) + ", " + this.v.toFixed(3) + "]";
}
}
}
|
package _codec.projects.tanks.client.panel.model.quest.weekly {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.quest.weekly.WeeklyQuestShowingCC;
public class CodecWeeklyQuestShowingCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_hasNewQuests:ICodec;
private var codec_timeToNextQuest:ICodec;
public function CodecWeeklyQuestShowingCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_hasNewQuests = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_timeToNextQuest = param1.getCodec(new TypeCodecInfo(int,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:WeeklyQuestShowingCC = new WeeklyQuestShowingCC();
local2.hasNewQuests = this.codec_hasNewQuests.decode(param1) as Boolean;
local2.timeToNextQuest = this.codec_timeToNextQuest.decode(param1) as int;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:WeeklyQuestShowingCC = WeeklyQuestShowingCC(param2);
this.codec_hasNewQuests.encode(param1,local3.hasNewQuests);
this.codec_timeToNextQuest.encode(param1,local3.timeToNextQuest);
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapSmallRank26.png")]
public class DefaultRanksBitmaps_bitmapSmallRank26 extends BitmapAsset {
public function DefaultRanksBitmaps_bitmapSmallRank26() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.bonus.bonus {
public class BonusesType {
public static const CRYSTAL:BonusesType = new BonusesType(0,"CRYSTAL");
public static const NITRO:BonusesType = new BonusesType(1,"NITRO");
public static const ARMOR_UP:BonusesType = new BonusesType(2,"ARMOR_UP");
public static const FIRST_AID:BonusesType = new BonusesType(3,"FIRST_AID");
public static const DAMAGE_UP:BonusesType = new BonusesType(4,"DAMAGE_UP");
public static const RECHARGE:BonusesType = new BonusesType(5,"RECHARGE");
public static const GOLD:BonusesType = new BonusesType(6,"GOLD");
private var _value:int;
private var _name:String;
public function BonusesType(param1:int, param2:String) {
super();
this._value = param1;
this._name = param2;
}
public static function get values() : Vector.<BonusesType> {
var local1:Vector.<BonusesType> = new Vector.<BonusesType>();
local1.push(CRYSTAL);
local1.push(NITRO);
local1.push(ARMOR_UP);
local1.push(FIRST_AID);
local1.push(DAMAGE_UP);
local1.push(RECHARGE);
local1.push(GOLD);
return local1;
}
public function toString() : String {
return "BonusesType [" + this._name + "]";
}
public function get value() : int {
return this._value;
}
public function get name() : String {
return this._name;
}
}
}
|
package assets.scroller {
import flash.display.BitmapData;
public class TrackPNG extends BitmapData {
public function TrackPNG(param1:int, param2:int, param3:Boolean = true, param4:uint = 0) {
super(param1,param2,param3,param4);
}
}
}
|
package projects.tanks.client.panel.model.emailreminder {
public interface IEmailReminderModelBase {
function activateMessage(param1:String) : void;
function notifyEmailIsBusy(param1:String) : void;
function notifyEmailIsForbidden(param1:String) : void;
function notifyEmailIsFree(param1:String) : void;
function openConfirmEmailReminder(param1:String) : void;
function openEnterEmailReminder() : void;
function openThanksForConfirmationEmailWindow() : void;
}
}
|
package projects.tanks.client.battleselect.model.battle.entrance.user {
import alternativa.types.Long;
public class BattleInfoUser {
private var _clanId:Long;
private var _score:int;
private var _suspicious:Boolean;
private var _user:Long;
public function BattleInfoUser(param1:Long = null, param2:int = 0, param3:Boolean = false, param4:Long = null) {
super();
this._clanId = param1;
this._score = param2;
this._suspicious = param3;
this._user = param4;
}
public function get clanId() : Long {
return this._clanId;
}
public function set clanId(param1:Long) : void {
this._clanId = param1;
}
public function get score() : int {
return this._score;
}
public function set score(param1:int) : void {
this._score = param1;
}
public function get suspicious() : Boolean {
return this._suspicious;
}
public function set suspicious(param1:Boolean) : void {
this._suspicious = param1;
}
public function get user() : Long {
return this._user;
}
public function set user(param1:Long) : void {
this._user = param1;
}
public function toString() : String {
var local1:String = "BattleInfoUser [";
local1 += "clanId = " + this.clanId + " ";
local1 += "score = " + this.score + " ";
local1 += "suspicious = " + this.suspicious + " ";
local1 += "user = " + this.user + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.weapons.shell {
import alternativa.math.Vector3;
import alternativa.tanks.battle.objects.tank.Tank;
[ModelInterface]
public interface TargetShellWeaponListener {
function onShotWithTarget(param1:int, param2:int, param3:Vector3, param4:Tank, param5:Vector3) : void;
}
}
|
package alternativa.tanks.service.notificationcategories {
import flash.events.Event;
public class NotificationGarageCategoriesEvent extends Event {
public static const NOTIFICATION_CHANGE:String = "NotificationGarageCategoriesEvent.NOTIFICATION_CHANGE";
public function NotificationGarageCategoriesEvent(param1:String) {
super(param1);
}
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangIcon_p14 extends BitmapAsset
{
public function RangIcon_p14()
{
super();
}
}
}
|
package alternativa.tanks.servermodels.registartion.password {
[ModelInterface]
public interface IPasswordRegistration {
function register(param1:String, param2:String, param3:String, param4:Boolean, param5:String, param6:String, param7:String) : void;
function checkCallsign(param1:String) : void;
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapBigRank18.png")]
public class DefaultRanksBitmaps_bitmapBigRank18 extends BitmapAsset {
public function DefaultRanksBitmaps_bitmapBigRank18() {
super();
}
}
}
|
package projects.tanks.client.panel.model.payment.panel {
public interface IPaymentButtonModelBase {
}
}
|
package projects.tanks.client.chat.models.clanchat.clanchat {
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 ClanChatModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _sendMessageId:Long = Long.getLong(1827913852,-359795897);
private var _sendMessage_targetUserNameCodec:ICodec;
private var _sendMessage_textCodec:ICodec;
private var model:IModel;
public function ClanChatModelServer(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._sendMessage_targetUserNameCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._sendMessage_textCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
}
public function sendMessage(param1:String, param2:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._sendMessage_targetUserNameCodec.encode(this.protocolBuffer,param1);
this._sendMessage_textCodec.encode(this.protocolBuffer,param2);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local3:SpaceCommand = new SpaceCommand(Model.object.id,this._sendMessageId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.tanks.sfx
{
import alternativa.tanks.models.battlefield.scene3dcontainer.Scene3DContainer;
public interface IGraphicEffect extends ISpecialEffect
{
function addToContainer(param1:Scene3DContainer) : void;
}
}
|
package projects.tanks.clients.flash.commons.models.challenge {
public interface ChallengeInfoService {
function isInTime() : Boolean;
function getEndTime() : Number;
function startEvent(param1:int) : void;
}
}
|
package projects.tanks.client.battlefield.models.mapbonuslight {
public interface IMapBonusLightModelBase {
}
}
|
package alternativa.engine3d.animation {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.animation.events.NotifyEvent;
import alternativa.engine3d.core.Object3D;
import flash.utils.Dictionary;
import flash.utils.getTimer;
use namespace alternativa3d;
public class AnimationController {
private var _root:AnimationNode;
private var _objects:Vector.<Object>;
private var _object3ds:Vector.<Object3D> = new Vector.<Object3D>();
private var objectsUsedCount:Dictionary = new Dictionary();
private var states:Object = new Object();
private var lastTime:int = -1;
alternativa3d var nearestNotifyers:AnimationNotify;
public function AnimationController() {
super();
}
public function get root() : AnimationNode {
return this._root;
}
public function set root(param1:AnimationNode) : void {
if(this._root != param1) {
if(this._root != null) {
this._root.alternativa3d::setController(null);
this._root.alternativa3d::_isActive = false;
}
if(param1 != null) {
param1.alternativa3d::setController(this);
param1.alternativa3d::_isActive = true;
}
this._root = param1;
}
}
public function update() : void {
var local1:Number = NaN;
var local2:AnimationState = null;
var local3:int = 0;
var local4:int = 0;
var local6:int = 0;
var local7:Object3D = null;
if(this.lastTime < 0) {
this.lastTime = getTimer();
local1 = 0;
} else {
local6 = getTimer();
local1 = 0.001 * (local6 - this.lastTime);
this.lastTime = local6;
}
if(this._root == null) {
return;
}
for each(local2 in this.states) {
local2.reset();
}
this._root.alternativa3d::update(local1,1);
local3 = 0;
local4 = int(this._object3ds.length);
while(local3 < local4) {
local7 = this._object3ds[local3];
local2 = this.states[local7.name];
if(local2 != null) {
local2.apply(local7);
}
local3++;
}
var local5:AnimationNotify = this.alternativa3d::nearestNotifyers;
while(local5 != null) {
if(local5.willTrigger(NotifyEvent.NOTIFY)) {
local5.dispatchEvent(new NotifyEvent(local5));
}
local5 = local5.alternativa3d::processNext;
}
this.alternativa3d::nearestNotifyers = null;
}
alternativa3d function addObject(param1:Object) : void {
if(param1 in this.objectsUsedCount) {
++this.objectsUsedCount[param1];
} else {
if(param1 is Object3D) {
this._object3ds.push(param1);
} else {
this._objects.push(param1);
}
this.objectsUsedCount[param1] = 1;
}
}
alternativa3d function removeObject(param1:Object) : void {
var local3:int = 0;
var local4:int = 0;
var local5:int = 0;
var local2:int = int(this.objectsUsedCount[param1]);
local2--;
if(local2 <= 0) {
if(param1 is Object3D) {
local3 = int(this._object3ds.indexOf(param1));
local5 = this._object3ds.length - 1;
local4 = local3 + 1;
while(local3 < local5) {
this._object3ds[local3] = this._object3ds[local4];
local3++;
local4++;
}
this._object3ds.length = local5;
} else {
local3 = int(this._objects.indexOf(param1));
local5 = this._objects.length - 1;
local4 = local3 + 1;
while(local3 < local5) {
this._objects[local3] = this._objects[local4];
local3++;
local4++;
}
this._objects.length = local5;
}
delete this.objectsUsedCount[param1];
} else {
this.objectsUsedCount[param1] = local2;
}
}
alternativa3d function getState(param1:String) : AnimationState {
var local2:AnimationState = this.states[param1];
if(local2 == null) {
local2 = new AnimationState();
this.states[param1] = local2;
}
return local2;
}
public function freeze() : void {
this.lastTime = -1;
}
}
}
|
package scpacker.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class GTanksI_coldload3 extends BitmapAsset
{
public function GTanksI_coldload3()
{
super();
}
}
}
|
package alternativa.protocol.codec.complex
{
import alternativa.protocol.codec.AbstractCodec;
import alternativa.protocol.codec.ICodec;
import alternativa.protocol.codec.NullMap;
import flash.utils.IDataInput;
import flash.utils.IDataOutput;
public class ArrayCodec extends AbstractCodec
{
private var targetClass:Class;
private var elementCodec:ICodec;
private var elementnotnull:Boolean;
private var depth:int;
public function ArrayCodec(targetClass:Class, elementCodec:ICodec, elementnotnull:Boolean, depth:int = 1)
{
super();
this.targetClass = targetClass;
this.elementCodec = elementCodec;
this.elementnotnull = elementnotnull;
this.depth = depth;
}
override public function encode(dest:IDataOutput, object:Object, nullmap:NullMap, notnull:Boolean) : void
{
if(!notnull)
{
nullmap.addBit(object == nullValue);
}
if(object != nullValue)
{
this.encodeArray(dest,object as Array,nullmap,1);
}
else if(notnull)
{
throw new Error("Object is null, but notnull expected.");
}
}
override public function decode(reader:IDataInput, nullmap:NullMap, notnull:Boolean) : Object
{
return !notnull && nullmap.getNextBit() ? nullValue : this.decodeArray(reader,nullmap,1);
}
private function decodeArray(reader:IDataInput, nullmap:NullMap, currentDepth:int) : Array
{
var i:int = 0;
var length:int = LengthCodec.decodeLength(reader);
var result:Array = new Array();
if(currentDepth == this.depth)
{
for(i = 0; i < length; i++)
{
result[i] = this.elementCodec.decode(reader,nullmap,this.elementnotnull);
}
}
else
{
currentDepth++;
for(i = 0; i < length; i++)
{
result[i] = this.decodeArray(reader,nullmap,currentDepth);
}
}
return result;
}
private function encodeArray(dest:IDataOutput, object:Array, nullmap:NullMap, currentDepth:int) : void
{
var element:Object = null;
var array:Array = null;
LengthCodec.encodeLength(dest,object.length);
if(currentDepth == this.depth)
{
for each(element in object)
{
this.elementCodec.encode(dest,element,nullmap,this.elementnotnull);
}
}
else
{
currentDepth++;
for each(array in object)
{
this.encodeArray(dest,array,nullmap,currentDepth);
}
}
}
}
}
|
package com.lorentz.SVG.data.gradients
{
import flash.display.GradientType;
public class SVGLinearGradient extends SVGGradient
{
public function SVGLinearGradient() {
super(GradientType.LINEAR);
}
public var x1:String;
public var y1:String;
public var x2:String;
public var y2:String;
override public function copyTo(target:SVGGradient):void {
super.copyTo(target);
var targetLinearGradient:SVGLinearGradient = target as SVGLinearGradient;
if(targetLinearGradient){
targetLinearGradient.x1 = x1;
targetLinearGradient.y1 = y1;
targetLinearGradient.x2 = x2;
targetLinearGradient.y2 = y2;
}
}
}
} |
package alternativa.tanks.models.weapon.shaft {
import alternativa.math.Vector3;
import alternativa.osgi.service.display.IDisplay;
import alternativa.physics.Body;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.events.BattleEventDispatcher;
import alternativa.tanks.battle.events.BattleEventSupport;
import alternativa.tanks.battle.events.StateCorrectionEvent;
import alternativa.tanks.battle.events.TankAddedToBattleEvent;
import alternativa.tanks.battle.events.TankRemovedFromBattleEvent;
import alternativa.tanks.battle.events.TankUnloadedEvent;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.battle.objects.tank.Weapon;
import alternativa.tanks.battle.objects.tank.controllers.LocalShaftController;
import alternativa.tanks.battle.objects.tank.controllers.LocalTurretController;
import alternativa.tanks.battle.objects.tank.tankskin.TankSkin;
import alternativa.tanks.models.tank.DestroyTankPart;
import alternativa.tanks.models.tank.ITankModel;
import alternativa.tanks.models.tank.InitTankPart;
import alternativa.tanks.models.tank.speedcharacteristics.SpeedCharacteristics;
import alternativa.tanks.models.tank.ultimate.hunter.stun.UltimateStunListener;
import alternativa.tanks.models.weapon.IWeaponModel;
import alternativa.tanks.models.weapon.WeaponConst;
import alternativa.tanks.models.weapon.WeaponForces;
import alternativa.tanks.models.weapon.angles.verticals.VerticalAngles;
import alternativa.tanks.models.weapon.common.IWeaponCommonModel;
import alternativa.tanks.models.weapon.common.WeaponBuffListener;
import alternativa.tanks.models.weapon.common.WeaponCommonData;
import alternativa.tanks.models.weapon.laser.LaserPointer;
import alternativa.tanks.models.weapon.shared.SimpleWeaponController;
import alternativa.tanks.models.weapon.shared.shot.WeaponReloadTimeChangedListener;
import alternativa.tanks.models.weapon.turret.IRotatingTurretModel;
import alternativa.tanks.models.weapon.weakening.DistanceWeakening;
import alternativa.tanks.models.weapon.weakening.IWeaponWeakeningModel;
import alternativa.tanks.models.weapons.targeting.ShaftTargetingSystem;
import alternativa.tanks.models.weapons.targeting.TargetingSystem;
import flash.utils.Dictionary;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapon.shaft.IShaftModelBase;
import projects.tanks.client.battlefield.models.tankparts.weapon.shaft.ShaftCC;
import projects.tanks.client.battlefield.models.tankparts.weapon.shaft.ShaftModelBase;
import projects.tanks.client.battlefield.types.Vector3d;
[ModelInfo]
public class ShaftModel extends ShaftModelBase implements IShaftModelBase, IWeaponModel, IShaftWeaponCallback, ObjectLoadListener, InitTankPart, DestroyTankPart, WeaponBuffListener, WeaponReloadTimeChangedListener, UltimateStunListener {
[Inject]
public static var battleService:BattleService;
[Inject]
public static var display:IDisplay;
[Inject]
public static var battleEventDispatcher:BattleEventDispatcher;
private static const MAX_DISTANCE:Number = 10000000000;
private var battleEventSupport:BattleEventSupport;
private var object3DToTank:Dictionary = new Dictionary();
private var weapons:Dictionary = new Dictionary();
private var localUser:IGameObject;
private var tanksOnField:Dictionary = new Dictionary();
public function ShaftModel() {
super();
this.battleEventSupport = new BattleEventSupport(battleEventDispatcher);
this.battleEventSupport.addEventHandler(TankAddedToBattleEvent,this.onTankAddedToBattleEvent);
this.battleEventSupport.addEventHandler(TankUnloadedEvent,this.onTankUnloaded);
this.battleEventSupport.addEventHandler(TankRemovedFromBattleEvent,this.onTankRemovedFromBattle);
this.battleEventSupport.activateHandlers();
}
private static function getWeakening() : DistanceWeakening {
var local1:IWeaponWeakeningModel = IWeaponWeakeningModel(object.adapt(IWeaponWeakeningModel));
return local1.getDistanceWeakening();
}
private static function getEffects() : ShaftEffects {
var local1:IShaftSFXModel = IShaftSFXModel(object.adapt(IShaftSFXModel));
return local1.getEffects();
}
private static function createServerShotData(param1:Vector3, param2:Body, param3:Vector3) : ServerShotData {
var local4:Vector3d = null;
var local5:Vector3d = null;
var local6:Vector3d = null;
var local7:IGameObject = null;
var local8:int = 0;
var local9:Vector3 = null;
if(param2 != null) {
local7 = param2.tank.getUser();
local8 = param2.tank.incarnation;
local9 = param3;
local6 = BattleUtils.getVector3d(local9);
BattleUtils.globalToLocal(param2,local9);
local4 = BattleUtils.getVector3d(local9);
local5 = BattleUtils.getVector3d(param2.state.position);
}
return new ServerShotData(BattleUtils.getVector3dOrNull(param1),local4,local7,local8,local5,local6);
}
public function objectLoaded() : void {
var local1:ShaftCC = getInitParam();
local1.shrubsHidingRadiusMin = BattleUtils.toClientScale(local1.shrubsHidingRadiusMin);
local1.shrubsHidingRadiusMax = BattleUtils.toClientScale(local1.shrubsHidingRadiusMax);
}
public function initTankPart(param1:Tank) : void {
var local2:LocalTurretController = null;
var local3:ShaftWeapon = null;
var local4:LocalShaftController = null;
if(BattleUtils.isLocalTank(param1.user)) {
local2 = this.asRotatingTurretModel().getLocalTurretController();
local3 = this.weapons[param1.user];
local4 = new LocalShaftController(param1,local3,local2);
local3.setAimingListener(local4);
putData(LocalShaftController,local4);
}
}
public function destroyTankPart() : void {
var local1:SimpleWeaponController = SimpleWeaponController(getData(SimpleWeaponController));
if(local1 != null) {
local1.destroy();
}
var local2:LocalShaftController = LocalShaftController(getData(LocalShaftController));
if(local2 != null) {
local2.destroy();
}
}
private function asRotatingTurretModel() : IRotatingTurretModel {
return IRotatingTurretModel(object.adapt(IRotatingTurretModel));
}
[Obfuscation(rename="false")]
public function stopManulaTargeting(param1:IGameObject) : void {
var local2:RemoteShaftWeapon = this.weapons[param1];
if(local2 != null) {
local2.stopManualTargeting();
}
}
[Obfuscation(rename="false")]
public function fire(param1:IGameObject, param2:Vector3d, param3:IGameObject, param4:Vector3d, param5:Number) : void {
var local7:Vector3 = null;
var local8:Body = null;
var local9:Tank = null;
var local6:RemoteShaftWeapon = this.weapons[param1];
if(local6 != null) {
local6.stopManualTargeting();
if(param3 != null) {
local9 = this.tanksOnField[param3];
if(local9 == null) {
local8 = null;
} else {
local8 = local9.getBody();
local7 = BattleUtils.getVector3(param4);
BattleUtils.localToGlobal(local9.getBody(),local7);
}
}
local6.showShotEffects(BattleUtils.getVector3OrNull(param2),local8,local7,param5);
}
}
[Obfuscation(rename="false")]
public function activateManualTargeting(param1:IGameObject) : void {
var local2:RemoteShaftWeapon = this.weapons[param1];
if(local2 != null) {
local2.startManualTargeting();
}
}
public function createLocalWeapon(param1:IGameObject) : Weapon {
this.localUser = param1;
var local2:SimpleWeaponController = new SimpleWeaponController();
putData(SimpleWeaponController,local2);
var local3:IWeaponCommonModel = IWeaponCommonModel(object.adapt(IWeaponCommonModel));
var local4:WeaponCommonData = local3.getCommonData();
var local5:ShaftObject = new ShaftObject(object);
var local6:TargetingSystem = new ShaftTargetingSystem(param1,local5,MAX_DISTANCE);
var local7:WeaponForces = new WeaponForces(getInitParam().aimingImpact * WeaponConst.BASE_IMPACT_FORCE.getNumber(),local4.getRecoilForce());
var local8:VerticalAngles = VerticalAngles(object.adapt(VerticalAngles));
var local9:ShaftWeapon = new ShaftWeapon(local5,IShaftWeaponCallback(object.adapt(IShaftWeaponCallback)),getInitParam(),local8,local7,this.object3DToTank,param1,local6,getWeakening());
local2.setWeapon(local9);
local2.init();
this.weapons[param1] = local9;
return local9;
}
public function createRemoteWeapon(param1:IGameObject) : Weapon {
var local2:IWeaponCommonModel = IWeaponCommonModel(object.adapt(IWeaponCommonModel));
var local3:WeaponCommonData = local2.getCommonData();
var local4:ShaftEffects = getEffects();
var local5:SpeedCharacteristics = SpeedCharacteristics(param1.adapt(SpeedCharacteristics));
var local6:IRotatingTurretModel = IRotatingTurretModel(object.adapt(IRotatingTurretModel));
var local7:Weapon = new RemoteShaftWeapon(local3.getRecoilForce(),getInitParam(),local4,local6.getTurret(),local5,LaserPointer(object.adapt(LaserPointer)));
this.weapons[param1] = local7;
return local7;
}
public function onAimedShot(param1:int, param2:Vector3, param3:Body, param4:Vector3) : void {
var local5:ServerShotData = createServerShotData(param2,param3,param4);
this.battleEventSupport.dispatchEvent(StateCorrectionEvent.MANDATORY_UPDATE);
server.aimedShotCommand(param1,local5.staticHitPoint,local5.tank,local5.hitPoint,local5.incarnation,local5.tankPosition,local5.targetPositionGlobal);
}
public function onQuickShot(param1:int, param2:Vector3, param3:Body, param4:Vector3) : void {
var local5:ServerShotData = createServerShotData(param2,param3,param4);
this.battleEventSupport.dispatchEvent(StateCorrectionEvent.MANDATORY_UPDATE);
server.quickShotCommand(param1,local5.staticHitPoint,local5.tank,local5.hitPoint,local5.incarnation,local5.tankPosition,local5.targetPositionGlobal);
}
public function onBeginEnergyDrain(param1:int) : void {
server.beginEnergyDrainCommand(param1);
}
public function onManualTargetingStart() : void {
server.activateManualTargetingCommand();
}
public function onManualTargetingStop() : void {
server.stopManualTargetingCommand();
}
private function onTankAddedToBattleEvent(param1:TankAddedToBattleEvent) : void {
this.addTankSkinAssociation(param1.tank);
this.tanksOnField[param1.tank.getUser()] = param1.tank;
}
private function addTankSkinAssociation(param1:Tank) : void {
var local2:TankSkin = param1.getSkin();
this.object3DToTank[local2.getHullMesh()] = param1;
this.object3DToTank[local2.getTurret3D()] = param1;
}
private function onTankUnloaded(param1:TankUnloadedEvent) : void {
var local2:IGameObject = param1.tank.getUser();
if(local2 == this.localUser) {
this.localUser = null;
}
delete this.weapons[local2];
}
private function onTankRemovedFromBattle(param1:TankRemovedFromBattleEvent) : void {
delete this.tanksOnField[param1.tank.getUser()];
this.removeTankSkinAssociation(param1.tank.getSkin());
}
private function removeTankSkinAssociation(param1:TankSkin) : void {
delete this.object3DToTank[param1.getHullMesh()];
delete this.object3DToTank[param1.getTurret3D()];
}
public function enteredInManualMode() : void {
server.activateManualTargetingCommand();
}
public function reconfigureWeapon(param1:Number, param2:Number, param3:Boolean) : void {
var local4:ShaftWeapon = null;
if(this.isLocalWeapon()) {
local4 = this.weapons[this.localUser];
if(local4 != null) {
local4.reconfigure(param1,param2,param3);
server.stopManualTargetingCommand();
}
}
}
public function weaponBuffStateChanged(param1:IGameObject, param2:Boolean, param3:Number) : void {
var local4:Weapon = this.weapons[param1];
if(local4 != null) {
local4.updateRecoilForce(param3);
local4.fullyRecharge();
}
}
public function weaponReloadTimeChanged(param1:int, param2:int) : void {
var local3:ShaftWeapon = null;
if(this.isLocalWeapon()) {
local3 = this.weapons[this.localUser];
if(local3 != null) {
local3.weaponReloadTimeChanged(param1,param2);
}
}
}
public function onStun(param1:Tank, param2:Boolean) : void {
var local3:Weapon = null;
if(param2 && this.localUser != null) {
local3 = this.weapons[this.localUser];
if(local3 != null) {
local3.stun();
}
}
}
public function onCalm(param1:Tank, param2:Boolean, param3:int) : void {
var local4:Weapon = null;
if(param2 && this.localUser != null) {
local4 = this.weapons[this.localUser];
if(local4 != null) {
local4.calm(param3);
}
}
}
private function isLocalWeapon() : Boolean {
var local1:Tank = IWeaponCommonModel(object.adapt(IWeaponCommonModel)).getTank();
return ITankModel(local1.user.adapt(ITankModel)).isLocal();
}
}
}
|
package projects.tanks.client.panel.model.usercountry {
public interface IUserCountryModelBase {
function requestUserCountry(param1:String) : void;
function showPaymentWindow() : void;
}
}
|
package forms.registration.bubbles {
import alternativa.osgi.service.locale.ILocaleService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.BubbleHelper;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.HelperAlign;
public class PasswordsDoNotMatchBubble extends BubbleHelper {
[Inject]
public static var localeService:ILocaleService;
public function PasswordsDoNotMatchBubble() {
super();
text = localeService.getText(TanksLocale.TEXT_HELP_PASSWORDS_DO_NOT_MATCH);
arrowLehgth = 20;
arrowAlign = HelperAlign.TOP_LEFT;
_showLimit = 3;
}
}
}
|
package _codec.projects.tanks.client.garage.models.garage.temperature {
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.garage.models.garage.temperature.TemperatureCC;
public class VectorCodecTemperatureCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecTemperatureCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(TemperatureCC,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.<TemperatureCC> = new Vector.<TemperatureCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = TemperatureCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:TemperatureCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<TemperatureCC> = Vector.<TemperatureCC>(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 scpacker.gui
{
import alternativa.init.Main;
import controls.Label;
import controls.statassets.BlackRoundRect;
import flash.display.Sprite;
import flash.events.Event;
public class ServerMessage extends Sprite
{
private var bg:BlackRoundRect;
private var label:Label;
public function ServerMessage(str:String)
{
this.bg = new BlackRoundRect();
this.label = new Label();
super();
addChild(this.bg);
addChild(this.label);
this.label.text = str;
this.label.size = 14;
this.label.x = 10;
this.bg.width = this.label.width + 20;
this.bg.height = this.label.height + 30;
this.label.y = this.bg.height / 2 - this.label.height / 2 - 2;
Main.stage.addEventListener(Event.RESIZE,this.resize);
this.resize(null);
}
private function resize(e:Event) : void
{
this.x = Main.stage.stageWidth / 2 - this.width / 2;
this.y = Main.stage.stageHeight / 2 - this.height / 2;
}
}
}
|
package projects.tanks.client.panel.model.payment.modes.paygarden {
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 PayGardenPaymentModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _getPaymentUrlId:Long = Long.getLong(63544351,1183761318);
private var _getPaymentUrl_shopItemIdCodec:ICodec;
private var model:IModel;
public function PayGardenPaymentModelServer(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 scpacker.gui
{
import flash.utils.ByteArray;
import mx.core.MovieClipLoaderAsset;
public class GTanksLoaderWindow_p extends MovieClipLoaderAsset
{
private static var bytes:ByteArray = null;
[Embed(source="GTanksLoaderWindow_p_dataClass.swf", mimeType="application/octet-stream")]
public var dataClass:Class;
public function GTanksLoaderWindow_p()
{
super();
initialWidth = 14960 / 20;
initialHeight = 1440 / 20;
}
override public function get movieClipData() : ByteArray
{
if(bytes == null)
{
bytes = ByteArray(new this.dataClass());
}
return bytes;
}
}
}
|
package alternativa.tanks.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ItemInfoPanel_bitmapRateOfFire extends BitmapAsset
{
public function ItemInfoPanel_bitmapRateOfFire()
{
super();
}
}
}
|
package alternativa.tanks.gui.newbiesabonement {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.*;
import alternativa.tanks.help.DateTimeHelper;
import alternativa.tanks.newbieservice.NewbieUserService;
import controls.TankWindowInner;
import controls.base.DefaultButtonBase;
import controls.base.LabelBase;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.text.TextFormatAlign;
import forms.TankWindowWithHeader;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow;
public class NewbiesAbonementInfoWindow extends DialogWindow implements IDestroyWindow {
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var newbieUserService:NewbieUserService;
private static const NEWBIES_ABONEMENT_INFO_IMG:Class = NewbiesAbonementInfoWindow_NEWBIES_ABONEMENT_INFO_IMG;
private static const NEWBIES_ABONEMENT_INFO_IMG_DATA:BitmapData = new NEWBIES_ABONEMENT_INFO_IMG().bitmapData;
private var _isInit:Boolean;
private var window:TankWindowWithHeader;
private var inner:TankWindowInner;
private var messageBottomLabel:LabelBase;
private var presentBitmap:Bitmap = new Bitmap(NEWBIES_ABONEMENT_INFO_IMG_DATA);
private var closeButton:DefaultButtonBase;
private var windowWidth:int = 450;
private const WINDOW_MARGIN:int = 12;
private const MARGIN:int = 9;
private const BUTTON_SIZE:Point = new Point(104,33);
private const MIN_WIDTH:int = 300;
private var _messageBottom:String;
private var crystalBonusPattern:RegExp = /CRYSTAL_BONUS/gi;
private var scoreBonusPattern:RegExp = /EXPERIENCE_BONUS/gi;
public function NewbiesAbonementInfoWindow(param1:Date, param2:int, param3:int) {
super();
var local4:String = DateTimeHelper.formatDateTimeWithExpiredLabel(param1);
this._messageBottom = localeService.getText(TanksLocale.TEXT_NEWBIES_ABONEMENT_WINDOW_TEXT);
this._messageBottom += "\r\n" + local4;
this._messageBottom = this._messageBottom.replace(this.crystalBonusPattern,param2).replace(this.scoreBonusPattern,param3);
this.init();
}
private function init() : void {
this._isInit = true;
this.windowWidth = Math.max(this.presentBitmap.width + this.WINDOW_MARGIN * 2 + this.MARGIN * 2,this.MIN_WIDTH);
this.window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_CONGRATULATION,this.windowWidth,this.presentBitmap.height);
addChild(this.window);
this.inner = new TankWindowInner(0,0,TankWindowInner.GREEN);
addChild(this.inner);
this.inner.x = this.WINDOW_MARGIN;
this.inner.y = this.WINDOW_MARGIN;
this.presentBitmap.x = this.windowWidth - this.presentBitmap.width >> 1;
this.presentBitmap.y = this.WINDOW_MARGIN * 2;
addChild(this.presentBitmap);
this.messageBottomLabel = new LabelBase();
this.messageBottomLabel.align = TextFormatAlign.LEFT;
this.messageBottomLabel.wordWrap = true;
this.messageBottomLabel.multiline = true;
this.messageBottomLabel.size = 12;
this.messageBottomLabel.color = 5898034;
this.messageBottomLabel.htmlText = this._messageBottom;
this.messageBottomLabel.x = this.WINDOW_MARGIN * 2;
this.messageBottomLabel.y = this.presentBitmap.y + this.presentBitmap.height + this.MARGIN;
this.messageBottomLabel.width = this.windowWidth - this.WINDOW_MARGIN * 4;
addChild(this.messageBottomLabel);
if(this.messageBottomLabel.numLines > 2) {
this.messageBottomLabel.htmlText = this._messageBottom;
this.messageBottomLabel.width = this.windowWidth - this.WINDOW_MARGIN * 4;
}
this.closeButton = new DefaultButtonBase();
addChild(this.closeButton);
this.closeButton.label = localeService.getText(TanksLocale.TEXT_FREE_BONUSES_WINDOW_BUTTON_CLOSE_TEXT);
var local1:int = this.presentBitmap.height + this.closeButton.height + this.MARGIN * 2 + this.WINDOW_MARGIN * 3;
if(this.messageBottomLabel != null) {
local1 += this.messageBottomLabel.height + this.MARGIN;
}
this.window.height = local1;
this.closeButton.y = this.window.height - this.MARGIN - 35;
this.closeButton.x = this.window.width - this.closeButton.width >> 1;
this.inner.width = this.window.width - this.WINDOW_MARGIN * 2;
this.inner.height = this.window.height - this.WINDOW_MARGIN - this.MARGIN * 2 - this.BUTTON_SIZE.y + 2;
this.closeButton.addEventListener(MouseEvent.CLICK,this.closeWindow);
dialogService.enqueueDialog(this);
}
private function closeWindow(param1:MouseEvent = null) : void {
if(newbieUserService.isNewbieUser) {
newbieUserService.isNewbieUser = false;
}
this.destroy();
}
public function destroy() : void {
if(this._isInit) {
this._isInit = false;
this.closeButton.removeEventListener(MouseEvent.CLICK,this.closeWindow);
dialogService.removeDialog(this);
}
}
override protected function cancelKeyPressed() : void {
this.closeWindow();
}
override protected function confirmationKeyPressed() : void {
this.closeWindow();
}
}
}
|
package alternativa.tanks.display.resistance {
import alternativa.tanks.models.battle.gui.statistics.ShortUserInfo;
import alternativa.tanks.models.statistics.IClientUserInfo;
import flash.display.Bitmap;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
public class ResistanceShieldIcon {
private static var blueShield:Class = ResistanceShieldIcon_blueShield;
private static var greenShield:Class = ResistanceShieldIcon_greenShield;
private static var redShield:Class = ResistanceShieldIcon_redShield;
public function ResistanceShieldIcon() {
super();
}
public static function getBitmap(param1:BattleTeam) : Bitmap {
switch(param1) {
case BattleTeam.BLUE:
return new blueShield();
case BattleTeam.RED:
return new redShield();
default:
return new greenShield();
}
}
public static function getBitmapFor(param1:IGameObject) : Bitmap {
var local2:IGameObject = param1.space.rootObject;
var local3:IClientUserInfo = IClientUserInfo(local2.adapt(IClientUserInfo));
var local4:ShortUserInfo = local3.getShortUserInfo(param1.id);
return getBitmap(local4.teamType);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.sfx.firebird {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import platform.client.fp10.core.resource.types.MultiframeTextureResource;
import platform.client.fp10.core.resource.types.SoundResource;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.client.battlefield.models.tankparts.sfx.firebird.FlameThrowingSFXCC;
import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightingSFXEntity;
public class CodecFlameThrowingSFXCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_buffedFireSparksTexture:ICodec;
private var codec_fireTexture:ICodec;
private var codec_flameSound:ICodec;
private var codec_lightingSFXEntity:ICodec;
private var codec_muzzlePlaneTexture:ICodec;
public function CodecFlameThrowingSFXCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_buffedFireSparksTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_fireTexture = param1.getCodec(new TypeCodecInfo(MultiframeTextureResource,false));
this.codec_flameSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_lightingSFXEntity = param1.getCodec(new TypeCodecInfo(LightingSFXEntity,false));
this.codec_muzzlePlaneTexture = param1.getCodec(new TypeCodecInfo(MultiframeTextureResource,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:FlameThrowingSFXCC = new FlameThrowingSFXCC();
local2.buffedFireSparksTexture = this.codec_buffedFireSparksTexture.decode(param1) as TextureResource;
local2.fireTexture = this.codec_fireTexture.decode(param1) as MultiframeTextureResource;
local2.flameSound = this.codec_flameSound.decode(param1) as SoundResource;
local2.lightingSFXEntity = this.codec_lightingSFXEntity.decode(param1) as LightingSFXEntity;
local2.muzzlePlaneTexture = this.codec_muzzlePlaneTexture.decode(param1) as MultiframeTextureResource;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:FlameThrowingSFXCC = FlameThrowingSFXCC(param2);
this.codec_buffedFireSparksTexture.encode(param1,local3.buffedFireSparksTexture);
this.codec_fireTexture.encode(param1,local3.fireTexture);
this.codec_flameSound.encode(param1,local3.flameSound);
this.codec_lightingSFXEntity.encode(param1,local3.lightingSFXEntity);
this.codec_muzzlePlaneTexture.encode(param1,local3.muzzlePlaneTexture);
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.