mirror of
https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient.git
synced 2025-10-26 01:49:11 -07:00
55 lines
1.3 KiB
ActionScript
55 lines
1.3 KiB
ActionScript
package alternativa.tanks.game.subsystems.rendersystem
|
|
{
|
|
import package_21.name_78;
|
|
import package_24.OmniLight;
|
|
|
|
public class OmniLightList
|
|
{
|
|
private var container:name_78;
|
|
|
|
private var var_16:Vector.<OmniLight>;
|
|
|
|
public function OmniLightList(container:name_78)
|
|
{
|
|
super();
|
|
this.container = container;
|
|
this.var_16 = new Vector.<OmniLight>();
|
|
}
|
|
|
|
public function add(light:OmniLight) : void
|
|
{
|
|
if(this.var_16.indexOf(light) < 0)
|
|
{
|
|
this.var_16.push(light);
|
|
this.container.addChild(light);
|
|
}
|
|
}
|
|
|
|
public function remove(light:OmniLight) : 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.<OmniLight>
|
|
{
|
|
return Vector.<OmniLight>(this.var_16);
|
|
}
|
|
|
|
public function method_645(i:int) : OmniLight
|
|
{
|
|
return this.var_16[i];
|
|
}
|
|
}
|
|
}
|
|
|