mirror of
https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient.git
synced 2025-10-26 01:49:11 -07:00
package_2 alternativa.tanks.game.entities.map
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package_1 alternativa.osgi.service.console.variables
|
||||
package_2 alternativa.tanks.game.entities.map
|
||||
package_5 alternativa.osgi
|
||||
package_6 alternativa.osgi.service.console
|
||||
package_7 alternativa.tanks
|
||||
|
||||
@@ -24,8 +24,8 @@ package
|
||||
import alternativa.protocol.osgi.ProtocolActivator;
|
||||
import platform.clients.fp10.libraries.alternativaprotocol.Activator;
|
||||
import package_18.name_44;
|
||||
import package_2.name_2;
|
||||
import package_2.name_9;
|
||||
import alternativa.tanks.game.entities.map.VisibleLightMaterial;
|
||||
import alternativa.tanks.game.entities.map.MapMaterial;
|
||||
import package_3.TankMaterial2;
|
||||
import package_3.name_10;
|
||||
import package_3.name_29;
|
||||
@@ -69,9 +69,9 @@ package
|
||||
this.initClient();
|
||||
this.initConsole();
|
||||
this.initOptionsSupport();
|
||||
name_2.fadeRadius = 7000;
|
||||
name_2.spotAngle = 140 * Math.PI / 180;
|
||||
name_2.fallofAngle = 170 * Math.PI / 180;
|
||||
VisibleLightMaterial.fadeRadius = 7000;
|
||||
VisibleLightMaterial.spotAngle = 140 * Math.PI / 180;
|
||||
VisibleLightMaterial.fallofAngle = 170 * Math.PI / 180;
|
||||
this.stage3D = stage.stage3Ds[0];
|
||||
this.stage3D.addEventListener(Event.CONTEXT3D_CREATE,this.onContextCreate);
|
||||
this.stage3D.requestContext3D();
|
||||
@@ -109,7 +109,7 @@ package
|
||||
new ConsoleVarFloat("beam_fallof",170,0,180,this.onLightSettingsChange);
|
||||
new ConsoleVarFloat("beam_fallof",170,0,180,this.onLightSettingsChange);
|
||||
new ConsoleVarFloat("camera_smoothing",20,0,200,this.onControllerSettingsChange);
|
||||
name_9.fogMode = name_9.DISABLED;
|
||||
MapMaterial.fogMode = MapMaterial.DISABLED;
|
||||
name_10.fogMode = name_10.DISABLED;
|
||||
name_7.fogMode = name_7.DISABLED;
|
||||
TankMaterial2.fogMode = name_7.DISABLED;
|
||||
@@ -127,13 +127,13 @@ package
|
||||
switch(param1.name_32())
|
||||
{
|
||||
case "beam_distance":
|
||||
name_2.fadeRadius = ConsoleVarFloat(param1).value;
|
||||
VisibleLightMaterial.fadeRadius = ConsoleVarFloat(param1).value;
|
||||
break;
|
||||
case "beam_spot":
|
||||
name_2.spotAngle = ConsoleVarFloat(param1).value * Math.PI / 180;
|
||||
VisibleLightMaterial.spotAngle = ConsoleVarFloat(param1).value * Math.PI / 180;
|
||||
break;
|
||||
case "beam_fallof":
|
||||
name_2.fallofAngle = ConsoleVarFloat(param1).value * Math.PI / 180;
|
||||
VisibleLightMaterial.fallofAngle = ConsoleVarFloat(param1).value * Math.PI / 180;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ package alternativa.tanks
|
||||
import package_15.name_55;
|
||||
import package_18.name_44;
|
||||
import package_19.name_53;
|
||||
import package_2.A3DMapComponent;
|
||||
import alternativa.tanks.game.entities.map.A3DMapComponent;
|
||||
import package_9.name_20;
|
||||
|
||||
public class InitBattleTask extends GameTask
|
||||
@@ -72,10 +72,10 @@ package alternativa.tanks
|
||||
}
|
||||
|
||||
import alternativa.tanks.game.GameEvents;
|
||||
import package_2.class_2;
|
||||
import alternativa.tanks.game.entities.map.IA3DMapComponentListener;
|
||||
import package_20.name_56;
|
||||
|
||||
class MapListener implements class_2
|
||||
class MapListener implements IA3DMapComponentListener
|
||||
{
|
||||
private var eventSystem:name_56;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package package_2
|
||||
package alternativa.tanks.game.entities.map
|
||||
{
|
||||
import alternativa.engine3d.alternativa3d;
|
||||
import flash.display.BitmapData;
|
||||
@@ -95,18 +95,18 @@ package package_2
|
||||
{
|
||||
var geometryFileName:String = null;
|
||||
this.mapFiles = mapFiles;
|
||||
var mapGeometryFiles:Vector.<String> = this.method_636(mapFiles);
|
||||
var mapGeometryFiles:Vector.<String> = this.getMapGeometryFiles(mapFiles);
|
||||
this.collector = new Vector.<name_78>();
|
||||
this.var_570 = new name_170();
|
||||
for each(geometryFileName in mapGeometryFiles)
|
||||
{
|
||||
this.var_570.addTask(new GeometryBuildTask(mapFiles.name_248(geometryFileName),this.collector));
|
||||
}
|
||||
this.var_570.addEventListener(Event.COMPLETE,this.method_632);
|
||||
this.var_570.addEventListener(Event.COMPLETE,this.onGeometryComplete);
|
||||
this.var_570.run();
|
||||
}
|
||||
|
||||
private function method_632(event:Event) : void
|
||||
private function onGeometryComplete(event:Event) : void
|
||||
{
|
||||
var surface:name_117 = null;
|
||||
var object:name_78 = null;
|
||||
@@ -138,21 +138,21 @@ package package_2
|
||||
this.var_406.push(decal);
|
||||
}
|
||||
mesh.calculateBoundBox();
|
||||
this.method_634(mesh,resourceCache);
|
||||
this.setupMaterials(mesh,resourceCache);
|
||||
this.var_346.push(mesh);
|
||||
}
|
||||
}
|
||||
this.collector = null;
|
||||
this.var_570 = null;
|
||||
this.method_635(this.mapFiles.name_248(TREES_FILE));
|
||||
this.method_638(this.mapFiles.name_248(MARKET_FILE));
|
||||
this.method_637(this.mapFiles.name_248(BEAMS_FILE));
|
||||
this.method_631(this.mapFiles.name_248(LIGHTS_FILE));
|
||||
this.method_633(this.mapFiles.name_248(PHYSICS_FILE));
|
||||
this.parseTrees(this.mapFiles.name_248(TREES_FILE));
|
||||
this.parseReflections(this.mapFiles.name_248(MARKET_FILE));
|
||||
this.parseBeams(this.mapFiles.name_248(BEAMS_FILE));
|
||||
this.parseLights(this.mapFiles.name_248(LIGHTS_FILE));
|
||||
this.parseCollisionGeometry(this.mapFiles.name_248(PHYSICS_FILE));
|
||||
dispatchEvent(new Event(Event.COMPLETE));
|
||||
}
|
||||
|
||||
private function method_638(data:ByteArray) : void
|
||||
private function parseReflections(data:ByteArray) : void
|
||||
{
|
||||
var parser:name_529 = null;
|
||||
var resourceCache:Object = null;
|
||||
@@ -185,20 +185,20 @@ package package_2
|
||||
{
|
||||
material = name_641(surface.material);
|
||||
diffName = name_167(material.textures["diffuse"]).url;
|
||||
diffuse = this.name_254(material.textures["diffuse"],resourceCache,this.mapFiles);
|
||||
bump = this.name_254(material.textures["bump"],resourceCache,this.mapFiles);
|
||||
opacity = this.name_254(material.textures["transparent"],resourceCache,this.mapFiles);
|
||||
emission = this.name_254(material.textures["emission"],resourceCache,this.mapFiles);
|
||||
diffuse = this.getCompressedTextureResource(material.textures["diffuse"],resourceCache,this.mapFiles);
|
||||
bump = this.getCompressedTextureResource(material.textures["bump"],resourceCache,this.mapFiles);
|
||||
opacity = this.getCompressedTextureResource(material.textures["transparent"],resourceCache,this.mapFiles);
|
||||
emission = this.getCompressedTextureResource(material.textures["emission"],resourceCache,this.mapFiles);
|
||||
if(diffName.indexOf("vetrino01") >= 0)
|
||||
{
|
||||
reflection = this.name_254(new name_167("vetrino_rfl.atf"),resourceCache,this.mapFiles);
|
||||
reflection = this.getCompressedTextureResource(new name_167("vetrino_rfl.atf"),resourceCache,this.mapFiles);
|
||||
envMaterial = new name_643(diffuse,this.var_571,null,reflection,emission,opacity);
|
||||
envMaterial.reflection = 0.4;
|
||||
surface.material = envMaterial;
|
||||
}
|
||||
else
|
||||
{
|
||||
surface.material = new name_9(diffuse,emission,1,opacity);
|
||||
surface.material = new MapMaterial(diffuse,emission,1,opacity);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
@@ -209,36 +209,36 @@ package package_2
|
||||
}
|
||||
}
|
||||
|
||||
private function method_634(mesh:name_380, resourceCache:Object) : void
|
||||
private function setupMaterials(mesh:name_380, resourceCache:Object) : void
|
||||
{
|
||||
var surface:name_117 = null;
|
||||
var parserMaterial:name_641 = null;
|
||||
var diffuseTextureResource:name_129 = null;
|
||||
var emissionTextureResource:name_129 = null;
|
||||
var opacityTextureResource:name_129 = null;
|
||||
var material:name_9 = null;
|
||||
var material:MapMaterial = null;
|
||||
for each(surface in mesh.alternativa3d::var_92)
|
||||
{
|
||||
parserMaterial = surface.material as name_641;
|
||||
if(parserMaterial != null)
|
||||
{
|
||||
diffuseTextureResource = this.name_254(parserMaterial.textures["diffuse"],resourceCache,this.mapFiles);
|
||||
emissionTextureResource = this.name_254(parserMaterial.textures["emission"],resourceCache,this.mapFiles);
|
||||
opacityTextureResource = this.name_254(parserMaterial.textures["transparent"],resourceCache,this.mapFiles);
|
||||
diffuseTextureResource = this.getCompressedTextureResource(parserMaterial.textures["diffuse"],resourceCache,this.mapFiles);
|
||||
emissionTextureResource = this.getCompressedTextureResource(parserMaterial.textures["emission"],resourceCache,this.mapFiles);
|
||||
opacityTextureResource = this.getCompressedTextureResource(parserMaterial.textures["transparent"],resourceCache,this.mapFiles);
|
||||
if(emissionTextureResource == null)
|
||||
{
|
||||
material = new name_9(diffuseTextureResource,fakeEmissionTextureResource,0,opacityTextureResource);
|
||||
material = new MapMaterial(diffuseTextureResource,fakeEmissionTextureResource,0,opacityTextureResource);
|
||||
}
|
||||
else
|
||||
{
|
||||
material = new name_9(diffuseTextureResource,emissionTextureResource,1,opacityTextureResource);
|
||||
material = new MapMaterial(diffuseTextureResource,emissionTextureResource,1,opacityTextureResource);
|
||||
}
|
||||
surface.material = material;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function method_636(mapFiles:name_55) : Vector.<String>
|
||||
private function getMapGeometryFiles(mapFiles:name_55) : Vector.<String>
|
||||
{
|
||||
var name:String = null;
|
||||
var names:Vector.<String> = new Vector.<String>();
|
||||
@@ -253,7 +253,7 @@ package package_2
|
||||
return names;
|
||||
}
|
||||
|
||||
private function method_635(data:ByteArray) : void
|
||||
private function parseTrees(data:ByteArray) : void
|
||||
{
|
||||
var parser:name_529 = null;
|
||||
var resourceCache:Object = null;
|
||||
@@ -282,9 +282,9 @@ package package_2
|
||||
if(surface.material != null)
|
||||
{
|
||||
material = name_641(surface.material);
|
||||
diffuse = this.name_254(material.textures["diffuse"],resourceCache,this.mapFiles);
|
||||
bump = this.name_254(material.textures["bump"],resourceCache,this.mapFiles);
|
||||
opacity = this.name_254(material.textures["transparent"],resourceCache,this.mapFiles);
|
||||
diffuse = this.getCompressedTextureResource(material.textures["diffuse"],resourceCache,this.mapFiles);
|
||||
bump = this.getCompressedTextureResource(material.textures["bump"],resourceCache,this.mapFiles);
|
||||
opacity = this.getCompressedTextureResource(material.textures["transparent"],resourceCache,this.mapFiles);
|
||||
trMaterial = new name_10(diffuse,fakeBumpTextureResource,null,null,opacity);
|
||||
trMaterial.var_25 = 0;
|
||||
trMaterial.alphaThreshold = 0.2;
|
||||
@@ -298,7 +298,7 @@ package package_2
|
||||
}
|
||||
}
|
||||
|
||||
private function method_637(data:ByteArray) : void
|
||||
private function parseBeams(data:ByteArray) : void
|
||||
{
|
||||
var object:name_78 = null;
|
||||
var mesh:name_380 = null;
|
||||
@@ -325,9 +325,9 @@ package package_2
|
||||
if(surface.material != null)
|
||||
{
|
||||
material = name_641(surface.material);
|
||||
diffuse = this.name_254(material.textures["diffuse"],resourceCache,this.mapFiles);
|
||||
opacity = this.name_254(material.textures["transparent"],resourceCache,this.mapFiles);
|
||||
surface.material = new name_2(opacity);
|
||||
diffuse = this.getCompressedTextureResource(material.textures["diffuse"],resourceCache,this.mapFiles);
|
||||
opacity = this.getCompressedTextureResource(material.textures["transparent"],resourceCache,this.mapFiles);
|
||||
surface.material = new VisibleLightMaterial(opacity);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -336,7 +336,7 @@ package package_2
|
||||
}
|
||||
}
|
||||
|
||||
private function method_631(lightsData:ByteArray) : void
|
||||
private function parseLights(lightsData:ByteArray) : void
|
||||
{
|
||||
var parserCollada:name_530 = null;
|
||||
var numLights:uint = 0;
|
||||
@@ -355,7 +355,7 @@ package package_2
|
||||
}
|
||||
}
|
||||
|
||||
private function name_254(fileTextureResource:name_167, resourceCache:Object, mapFiles:name_55) : name_241
|
||||
private function getCompressedTextureResource(fileTextureResource:name_167, resourceCache:Object, mapFiles:name_55) : name_241
|
||||
{
|
||||
var textureName:String = null;
|
||||
var resource:name_241 = null;
|
||||
@@ -381,7 +381,7 @@ package package_2
|
||||
return null;
|
||||
}
|
||||
|
||||
private function method_633(a3dData:ByteArray) : void
|
||||
private function parseCollisionGeometry(a3dData:ByteArray) : void
|
||||
{
|
||||
var object:name_78 = null;
|
||||
var objectName:String = null;
|
||||
@@ -1,4 +1,4 @@
|
||||
package package_2
|
||||
package alternativa.tanks.game.entities.map
|
||||
{
|
||||
import alternativa.engine3d.alternativa3d;
|
||||
import flash.display.BitmapData;
|
||||
@@ -59,11 +59,11 @@ package package_2
|
||||
|
||||
private var var_90:Number = 1.5;
|
||||
|
||||
private var listener:class_2;
|
||||
private var listener:IA3DMapComponentListener;
|
||||
|
||||
private var var_91:Boolean = true;
|
||||
|
||||
public function A3DMapComponent(files:name_55, skyboxFiles:name_55, skyboxSize:Number, listener:class_2)
|
||||
public function A3DMapComponent(files:name_55, skyboxFiles:name_55, skyboxSize:Number, listener:IA3DMapComponentListener)
|
||||
{
|
||||
super();
|
||||
this.files = files;
|
||||
@@ -79,19 +79,19 @@ package package_2
|
||||
override public function addToGame(gameKernel:GameKernel) : void
|
||||
{
|
||||
this.gameKernel = gameKernel;
|
||||
this.method_205();
|
||||
gameKernel.name_66().name_94(name_83.KEY_DOWN,this.method_15);
|
||||
if(gameKernel.options[name_379.FAKE_MAP] != null)
|
||||
this.createSkybox();
|
||||
gameKernel.name_66().name_94(name_83.KEY_DOWN,this.onKeyDown);
|
||||
if(gameKernel.options[MapOptions.FAKE_MAP] != null)
|
||||
{
|
||||
this.method_204();
|
||||
this.buildFakeMap();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.method_202();
|
||||
this.buildRealMap();
|
||||
}
|
||||
}
|
||||
|
||||
private function method_205() : void
|
||||
private function createSkybox() : void
|
||||
{
|
||||
var skyBox:name_53 = null;
|
||||
var surfaceIds:Array = null;
|
||||
@@ -149,22 +149,22 @@ package package_2
|
||||
lights.omniLigths.remove(OmniLight(light));
|
||||
}
|
||||
}
|
||||
gameKernel.name_66().name_384(name_83.KEY_DOWN,this.method_15);
|
||||
gameKernel.name_66().name_384(name_83.KEY_DOWN,this.onKeyDown);
|
||||
this.gameKernel = null;
|
||||
}
|
||||
|
||||
private function method_202() : void
|
||||
private function buildRealMap() : void
|
||||
{
|
||||
this.var_89 = new A3DMapBuilder();
|
||||
this.var_89.addEventListener(Event.COMPLETE,this.method_200);
|
||||
this.var_89.addEventListener(Event.COMPLETE,this.onBuildingComplete);
|
||||
this.var_89.name_385(this.files);
|
||||
}
|
||||
|
||||
private function method_200(event:Event) : void
|
||||
private function onBuildingComplete(event:Event) : void
|
||||
{
|
||||
var staticShadowLight:DirectionalLight = this.method_207();
|
||||
this.method_206(staticShadowLight);
|
||||
this.method_208();
|
||||
var staticShadowLight:DirectionalLight = this.initLights();
|
||||
this.initGraphics(staticShadowLight);
|
||||
this.initPhysics();
|
||||
this.complete();
|
||||
}
|
||||
|
||||
@@ -177,13 +177,13 @@ package package_2
|
||||
}
|
||||
}
|
||||
|
||||
private function method_207() : DirectionalLight
|
||||
private function initLights() : DirectionalLight
|
||||
{
|
||||
var staticShadowLight:DirectionalLight = null;
|
||||
var light:name_116 = null;
|
||||
if(Boolean(this.gameKernel.options["fakelight"]))
|
||||
{
|
||||
this.method_210();
|
||||
this.initFakeLight();
|
||||
return null;
|
||||
}
|
||||
var renderSystem:name_44 = this.gameKernel.name_5();
|
||||
@@ -226,12 +226,12 @@ package package_2
|
||||
return staticShadowLight;
|
||||
}
|
||||
|
||||
private function method_210() : void
|
||||
private function initFakeLight() : void
|
||||
{
|
||||
this.gameKernel.name_5().lights.ambientLight = new name_376(16777215);
|
||||
}
|
||||
|
||||
private function method_206(staticShadowLight:DirectionalLight) : void
|
||||
private function initGraphics(staticShadowLight:DirectionalLight) : void
|
||||
{
|
||||
var object:name_78 = null;
|
||||
var renderSystem:name_44 = this.gameKernel.name_5();
|
||||
@@ -247,22 +247,22 @@ package package_2
|
||||
}
|
||||
}
|
||||
|
||||
private function method_208() : void
|
||||
private function initPhysics() : void
|
||||
{
|
||||
var renderSystem:name_44 = null;
|
||||
var physicsContainer:name_78 = null;
|
||||
var physicsSystem:name_178 = this.gameKernel.method_112();
|
||||
physicsSystem.name_382(this.var_89.collisionPrimitives);
|
||||
if(this.gameKernel.options[name_379.VISUALIZE_PHYSICS] != null)
|
||||
if(this.gameKernel.options[MapOptions.VISUALIZE_PHYSICS] != null)
|
||||
{
|
||||
renderSystem = this.gameKernel.name_5();
|
||||
physicsContainer = this.method_199(this.var_89.collisionPrimitives);
|
||||
physicsContainer = this.createPhysicsVisualObjects(this.var_89.collisionPrimitives);
|
||||
physicsContainer.visible = false;
|
||||
renderSystem.method_47(PHYSICS_GEOMETRY,physicsContainer,true);
|
||||
}
|
||||
}
|
||||
|
||||
private function method_199(collisionPrimitives:Vector.<name_235>) : name_78
|
||||
private function createPhysicsVisualObjects(collisionPrimitives:Vector.<name_235>) : name_78
|
||||
{
|
||||
var collisionPrimitive:name_235 = null;
|
||||
var physicsVisualContainer:name_78 = new name_78();
|
||||
@@ -274,27 +274,27 @@ package package_2
|
||||
collisionPrimitive = collisionPrimitives[i];
|
||||
if(collisionPrimitive is name_377)
|
||||
{
|
||||
physicsVisualContainer.addChild(this.method_211(name_377(collisionPrimitive),boxMaterial));
|
||||
physicsVisualContainer.addChild(this.createPhysicsVisualBox(name_377(collisionPrimitive),boxMaterial));
|
||||
}
|
||||
else if(collisionPrimitive is name_378)
|
||||
{
|
||||
physicsVisualContainer.addChild(this.method_209(name_378(collisionPrimitive),triangleMaterial));
|
||||
physicsVisualContainer.addChild(this.createPhysicsVisualTriangle(name_378(collisionPrimitive),triangleMaterial));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return physicsVisualContainer;
|
||||
}
|
||||
|
||||
private function method_211(collisionBox:name_377, material:class_4) : name_279
|
||||
private function createPhysicsVisualBox(collisionBox:name_377, material:class_4) : name_279
|
||||
{
|
||||
var size:name_194 = collisionBox.hs.clone().scale(2);
|
||||
var box:name_279 = new name_279(size.x,size.y,size.z);
|
||||
box.setMaterialToAllSurfaces(material);
|
||||
this.method_198(collisionBox,box);
|
||||
this.setPhysicsTransform(collisionBox,box);
|
||||
return box;
|
||||
}
|
||||
|
||||
private function method_209(collisionTriangle:name_378, material:class_4) : name_380
|
||||
private function createPhysicsVisualTriangle(collisionTriangle:name_378, material:class_4) : name_380
|
||||
{
|
||||
var mesh:name_380 = new name_380();
|
||||
var geometry:name_119 = new name_119();
|
||||
@@ -319,11 +319,11 @@ package package_2
|
||||
mesh.geometry = geometry;
|
||||
mesh.addSurface(material,0,1);
|
||||
mesh.calculateBoundBox();
|
||||
this.method_198(collisionTriangle,mesh);
|
||||
this.setPhysicsTransform(collisionTriangle,mesh);
|
||||
return mesh;
|
||||
}
|
||||
|
||||
private function method_198(collisionPrimitive:name_235, object:name_78) : void
|
||||
private function setPhysicsTransform(collisionPrimitive:name_235, object:name_78) : void
|
||||
{
|
||||
var t:Matrix4 = collisionPrimitive.transform;
|
||||
var eulerAngles:name_194 = new name_194();
|
||||
@@ -336,14 +336,14 @@ package package_2
|
||||
object.rotationZ = eulerAngles.z;
|
||||
}
|
||||
|
||||
private function method_204() : void
|
||||
private function buildFakeMap() : void
|
||||
{
|
||||
var collisionRect:name_381 = new name_381(new name_194(20000,20000),1,255);
|
||||
var collisionPrimitives:Vector.<name_235> = Vector.<name_235>([collisionRect]);
|
||||
this.gameKernel.method_112().name_382(collisionPrimitives);
|
||||
var renderSystem:name_44 = this.gameKernel.name_5();
|
||||
renderSystem.method_40(name_44.LIGHTS_CONTAINER_ID).addChild(new name_376(16777215));
|
||||
this.method_201(renderSystem);
|
||||
this.addZeroMarker(renderSystem);
|
||||
var bitmapData:BitmapData = new BitmapData(512,512);
|
||||
bitmapData.perlinNoise(10,10,3,13,false,true);
|
||||
var bitmapTextureResource:name_93 = new name_93(bitmapData);
|
||||
@@ -355,7 +355,7 @@ package package_2
|
||||
setTimeout(this.complete,0);
|
||||
}
|
||||
|
||||
private function method_201(renderSystem:name_44) : void
|
||||
private function addZeroMarker(renderSystem:name_44) : void
|
||||
{
|
||||
var resource:name_77 = null;
|
||||
var box:name_279 = new name_279(50,50,50);
|
||||
@@ -367,7 +367,7 @@ package package_2
|
||||
renderSystem.method_68().addChild(box);
|
||||
}
|
||||
|
||||
private function method_15(eventType:name_83, keyCode:uint) : void
|
||||
private function onKeyDown(eventType:name_83, keyCode:uint) : void
|
||||
{
|
||||
switch(keyCode)
|
||||
{
|
||||
@@ -382,7 +382,7 @@ package package_2
|
||||
}
|
||||
}
|
||||
|
||||
private function method_213() : void
|
||||
private function toggleDecals() : void
|
||||
{
|
||||
var d:name_91 = null;
|
||||
this.var_91 = !this.var_91;
|
||||
@@ -392,12 +392,12 @@ package package_2
|
||||
}
|
||||
}
|
||||
|
||||
private function get method_203() : Number
|
||||
private function get decalsOffset() : Number
|
||||
{
|
||||
return this.var_90;
|
||||
}
|
||||
|
||||
private function set method_203(value:Number) : void
|
||||
private function set decalsOffset(value:Number) : void
|
||||
{
|
||||
var decal:name_91 = null;
|
||||
this.var_90 = value;
|
||||
@@ -408,7 +408,7 @@ package package_2
|
||||
IConsole(OSGi.name_8().name_30(IConsole)).name_145("Decals offset: " + this.var_90);
|
||||
}
|
||||
|
||||
private function method_212(containerId:String) : void
|
||||
private function toggleGeometry(containerId:String) : void
|
||||
{
|
||||
var container:name_78 = this.gameKernel.name_5().method_40(containerId);
|
||||
if(container != null)
|
||||
@@ -0,0 +1,8 @@
|
||||
package alternativa.tanks.game.entities.map
|
||||
{
|
||||
public interface IA3DMapComponentListener
|
||||
{
|
||||
function onA3DMapComplete() : void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package package_2
|
||||
package alternativa.tanks.game.entities.map
|
||||
{
|
||||
import alternativa.engine3d.alternativa3d;
|
||||
import avmplus.getQualifiedClassName;
|
||||
@@ -28,7 +28,7 @@ package package_2
|
||||
|
||||
use namespace alternativa3d;
|
||||
|
||||
public class name_9 extends class_4
|
||||
public class MapMaterial extends class_4
|
||||
{
|
||||
private static var fogTexture:name_129;
|
||||
|
||||
@@ -90,7 +90,7 @@ package package_2
|
||||
|
||||
public var alpha:Number = 1;
|
||||
|
||||
public function name_9(diffuseMap:name_129, lightMap:name_129, lightMapChannel:uint = 0, opacityMap:name_129 = null)
|
||||
public function MapMaterial(diffuseMap:name_129, lightMap:name_129, lightMapChannel:uint = 0, opacityMap:name_129 = null)
|
||||
{
|
||||
super();
|
||||
this.diffuseMap = diffuseMap;
|
||||
@@ -121,7 +121,7 @@ package package_2
|
||||
}
|
||||
}
|
||||
|
||||
private function method_75(targetObject:name_78, shadows:Vector.<name_103>, numShadows:int) : MapMaterialProgram
|
||||
private function setupProgram(targetObject:name_78, shadows:Vector.<name_103>, numShadows:int) : MapMaterialProgram
|
||||
{
|
||||
var i:int = 0;
|
||||
var renderer:name_103 = null;
|
||||
@@ -257,7 +257,7 @@ package package_2
|
||||
var program:MapMaterialProgram = optionsPrograms[index];
|
||||
if(program == null)
|
||||
{
|
||||
program = this.method_75(object,object.alternativa3d::shadowRenderers,numShadows);
|
||||
program = this.setupProgram(object,object.alternativa3d::shadowRenderers,numShadows);
|
||||
program.upload(camera.alternativa3d::context3D);
|
||||
optionsPrograms[index] = program;
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
package package_2
|
||||
package alternativa.tanks.game.entities.map
|
||||
{
|
||||
public class name_379
|
||||
public class MapOptions
|
||||
{
|
||||
public static const FAKE_MAP:String = "fakemap";
|
||||
|
||||
public static const VISUALIZE_PHYSICS:String = "visualizePhysics";
|
||||
|
||||
public function name_379()
|
||||
public function MapOptions()
|
||||
{
|
||||
super();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package package_2
|
||||
package alternativa.tanks.game.entities.map
|
||||
{
|
||||
import alternativa.engine3d.alternativa3d;
|
||||
import flash.display3D.Context3DBlendFactor;
|
||||
@@ -26,7 +26,7 @@ package package_2
|
||||
|
||||
use namespace alternativa3d;
|
||||
|
||||
public class name_2 extends class_4
|
||||
public class VisibleLightMaterial extends class_4
|
||||
{
|
||||
public static var fadeRadius:Number = 100;
|
||||
|
||||
@@ -42,7 +42,7 @@ package package_2
|
||||
|
||||
public var texture:name_129;
|
||||
|
||||
public function name_2(texture:name_129)
|
||||
public function VisibleLightMaterial(texture:name_129)
|
||||
{
|
||||
super();
|
||||
this.texture = texture;
|
||||
@@ -57,7 +57,7 @@ package package_2
|
||||
}
|
||||
}
|
||||
|
||||
private function method_75(targetObject:name_78) : name_127
|
||||
private function setupProgram(targetObject:name_78) : name_127
|
||||
{
|
||||
var vertexLinker:name_121 = new name_121(Context3DProgramType.VERTEX);
|
||||
var fragmentLinker:name_121 = new name_121(Context3DProgramType.FRAGMENT);
|
||||
@@ -105,7 +105,7 @@ package package_2
|
||||
var program:name_127 = _programs[object.alternativa3d::transformProcedure];
|
||||
if(program == null)
|
||||
{
|
||||
program = this.method_75(object);
|
||||
program = this.setupProgram(object);
|
||||
program.upload(camera.alternativa3d::context3D);
|
||||
_programs[object.alternativa3d::transformProcedure] = program;
|
||||
}
|
||||
@@ -13,7 +13,7 @@ package package_18
|
||||
import flash.ui.Keyboard;
|
||||
import alternativa.tanks.game.GameTask;
|
||||
import package_19.name_91;
|
||||
import package_2.name_9;
|
||||
import alternativa.tanks.game.entities.map.MapMaterial;
|
||||
import package_21.name_77;
|
||||
import package_21.name_78;
|
||||
import package_21.name_81;
|
||||
@@ -175,7 +175,7 @@ package package_18
|
||||
|
||||
public function name_41(mode:int) : void
|
||||
{
|
||||
name_9.fogMode = mode;
|
||||
MapMaterial.fogMode = mode;
|
||||
name_7.fogMode = mode;
|
||||
TankMaterial2.fogMode = mode;
|
||||
name_33.fogMode = mode;
|
||||
@@ -184,7 +184,7 @@ package package_18
|
||||
name_29.fogMode = mode;
|
||||
if(mode == 1)
|
||||
{
|
||||
this.var_5.fogFar = name_9.fogFar;
|
||||
this.var_5.fogFar = MapMaterial.fogFar;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -194,7 +194,7 @@ package package_18
|
||||
|
||||
public function name_47(value:Number) : void
|
||||
{
|
||||
name_9.fogNear = value;
|
||||
MapMaterial.fogNear = value;
|
||||
name_7.fogNear = value;
|
||||
TankMaterial2.fogNear = value;
|
||||
name_33.fogNear = value;
|
||||
@@ -205,7 +205,7 @@ package package_18
|
||||
|
||||
public function name_48(value:Number) : void
|
||||
{
|
||||
name_9.fogFar = value;
|
||||
MapMaterial.fogFar = value;
|
||||
name_7.fogFar = value;
|
||||
TankMaterial2.fogFar = value;
|
||||
name_33.fogFar = value;
|
||||
@@ -216,7 +216,7 @@ package package_18
|
||||
|
||||
public function name_49(value:Number) : void
|
||||
{
|
||||
name_9.fogMaxDensity = value;
|
||||
MapMaterial.fogMaxDensity = value;
|
||||
name_7.fogMaxDensity = value;
|
||||
TankMaterial2.fogMaxDensity = value;
|
||||
name_33.fogMaxDensity = value;
|
||||
@@ -231,9 +231,9 @@ package package_18
|
||||
var r:Number = (color >> 16 & 0xFF) / 255;
|
||||
var g:Number = (color >> 8 & 0xFF) / 255;
|
||||
var b:Number = (color & 0xFF) / 255;
|
||||
name_9.fogColorR = r;
|
||||
name_9.fogColorG = g;
|
||||
name_9.fogColorB = b;
|
||||
MapMaterial.fogColorR = r;
|
||||
MapMaterial.fogColorG = g;
|
||||
MapMaterial.fogColorB = b;
|
||||
name_7.fogColorR = r;
|
||||
name_7.fogColorG = g;
|
||||
name_7.fogColorB = b;
|
||||
@@ -291,7 +291,7 @@ package package_18
|
||||
}
|
||||
this.var_6 = new name_93(bitmapData);
|
||||
this.method_29(this.var_6);
|
||||
name_9.method_33(this.var_6);
|
||||
MapMaterial.method_33(this.var_6);
|
||||
name_7.method_33(this.var_6);
|
||||
TankMaterial2.method_33(this.var_6);
|
||||
name_29.method_33(this.var_6);
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package package_2
|
||||
{
|
||||
public interface class_2
|
||||
{
|
||||
function onA3DMapComplete() : void;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user