package_18 alternativa.tanks.game.subsystems.rendersystem

This commit is contained in:
Pyogenics
2025-01-29 19:07:58 +00:00
parent 549f73b4c9
commit bbf438a33f
59 changed files with 341 additions and 340 deletions

View File

@@ -0,0 +1,54 @@
package alternativa.tanks.game.subsystems.rendersystem
{
import package_21.name_78;
import package_24.SpotLight;
public class SpotLightList
{
private var container:name_78;
private var var_16:Vector.<SpotLight>;
public function SpotLightList(container:name_78)
{
super();
this.container = container;
this.var_16 = new Vector.<SpotLight>();
}
public function add(light:SpotLight) : void
{
if(this.var_16.indexOf(light) < 0)
{
this.var_16.push(light);
this.container.addChild(light);
}
}
public function remove(light:SpotLight) : void
{
var index:int = int(this.var_16.indexOf(light));
if(index >= 0)
{
this.var_16[index] = this.var_16[this.var_16.length - 1];
this.var_16.length -= 1;
}
}
public function get size() : int
{
return this.var_16.length;
}
public function get lights() : Vector.<SpotLight>
{
return Vector.<SpotLight>(this.var_16);
}
public function method_645(i:int) : SpotLight
{
return this.var_16[i];
}
}
}