class ScrnLocalLaserDot extends DynamicProjector;

#exec OBJ LOAD FILE=ScrnTex.utx

struct SLaser {
    var Color LaserColor;
    var Material DotTexture, Skin3rd;
};
var const array<SLaser> Lasers;

var private byte LaserType;

var()       float                       ProjectorPullback;      // Amount to pull back the laser dot projector from the hit location


simulated function color GetLaserColor()
{
    return Lasers[LaserType].LaserColor;
}


static function Color GetLaserColorStatic(byte LaserType)
{
    if ( LaserType >= default.Lasers.Length )
        LaserType = 0;

    return default.Lasers[LaserType].LaserColor;
}

simulated function byte GetLaserType()
{
    return LaserType;
}

simulated function SetLaserType(byte value)
{
    if ( value >= Lasers.length )
        value = 0;

    LaserType = value;
    ProjTexture = Lasers[LaserType].DotTexture;
    bHidden = LaserType == 0 || ProjTexture == none;
}

defaultproperties
{
     Lasers(0)=(LaserColor=(A=1))
     Lasers(1)=(LaserColor=(R=255,A=255),DotTexture=Texture'ScrnTex.Laser.Laser_Dot_Red',Skin3rd=Texture'ScrnTex.Laser.LASER_Red')
     Lasers(2)=(LaserColor=(G=255,A=255),DotTexture=Texture'ScrnTex.Laser.Laser_Dot_Green',Skin3rd=Texture'ScrnTex.Laser.LASER_Green')
     Lasers(3)=(LaserColor=(B=255,G=150,A=255),DotTexture=Texture'ScrnTex.Laser.Laser_Dot_Blue',Skin3rd=Texture'ScrnTex.Laser.Laser_Blue')
     Lasers(4)=(LaserColor=(G=150,R=255,A=255),DotTexture=Texture'ScrnTex.Laser.Laser_Dot_Orange',Skin3rd=Texture'ScrnTex.Laser.Laser_Orange')
     ProjectorPullback=1.000000
     MaterialBlendingOp=PB_Add
     FrameBufferBlendingOp=PB_Add
     FOV=5
     MaxTraceDistance=100
     bClipBSP=True
     bProjectOnUnlit=True
     bGradient=True
     bProjectOnAlpha=True
     bProjectOnParallelBSP=True
     bNoProjectOnOwner=True
     DrawType=DT_None
     bLightChanged=True
     bSkipActorPropertyReplication=True
     LifeSpan=100000000.000000
     DrawScale=0.250000
}
