class BigShockShade expands Effects;

var() texture PanningTextures[32];	//Panning textures
var() float PanSpeed;			//Pan speed or rate
var() float MaxScaleInc;		//Final scale is (DrawScale + MaxScaleInc)
var() bool bGrowing;			//Growing shock?
var() bool bFadeOut;			//Should fade out?
var bool ExecuteSpecialEndCode;		//Only used by coders, used to call the function SpecialCode to spawn other effects at the life end

var byte PanC;
var float Count;
var float MinDrawScale;

simulated function PostBeginPlay()
{
	if (PanSpeed != 0)
		SetTimer(1/Abs(PanSpeed), True);

	MinDrawScale = DrawScale;
}


simulated function Destroyed()
{
	SpecialCode();
	Super.Destroyed();
}


function SpecialCode()
{
	//Spawn or execute other things
}


simulated function Tick( float DeltaTime)
{

	if (bGrowing)
		DrawScale = MinDrawScale + (MaxScaleInc * (Default.LifeSpan - LifeSpan) / Default.LifeSpan);
	else
		DrawScale = MinDrawScale + (MaxScaleInc * LifeSpan / Default.LifeSpan);


	if (bFadeOut)
		ScaleGlow = LifeSpan * Default.ScaleGlow / Default.LifeSpan;
}


simulated function Timer()
{
	if (PanSpeed > 0)
	{
		PanC++;
		if (PanC > 31)
			PanC = 0;
	}
	else
	{
		if (PanC == 0)
			PanC = 32;
		PanC--;
	}

	MultiSkins[1] = PanningTextures[PanC];
}


defaultproperties
{
	DrawType=DT_Mesh
	Mesh=BigShockwave
	DrawScale=1.000000
	ScaleGlow=25.000000
	LifeSpan=25.000000
	PanSpeed=128.000000
	MaxScaleInc=58.000000
	bGrowing=True
	bFadeOut=True
	RemoteRole=ROLE_SimulatedProxy
	bUnlit=True
	Style=STY_Translucent
	PanningTextures(0)=FirePan_01
	PanningTextures(1)=FirePan_02
	PanningTextures(2)=FirePan_03
	PanningTextures(3)=FirePan_04
	PanningTextures(4)=FirePan_05
	PanningTextures(5)=FirePan_06
	PanningTextures(6)=FirePan_07
	PanningTextures(7)=FirePan_08
	PanningTextures(8)=FirePan_09
	PanningTextures(9)=FirePan_10
	PanningTextures(10)=FirePan_11
	PanningTextures(11)=FirePan_12
	PanningTextures(12)=FirePan_13
	PanningTextures(13)=FirePan_14
	PanningTextures(14)=FirePan_15
	PanningTextures(15)=FirePan_16
	PanningTextures(16)=FirePan_17
	PanningTextures(17)=FirePan_18
	PanningTextures(18)=FirePan_19
	PanningTextures(19)=FirePan_20
	PanningTextures(20)=FirePan_21
	PanningTextures(21)=FirePan_22
	PanningTextures(22)=FirePan_23
	PanningTextures(23)=FirePan_24
	PanningTextures(24)=FirePan_25
	PanningTextures(25)=FirePan_26
	PanningTextures(26)=FirePan_27
	PanningTextures(27)=FirePan_28
	PanningTextures(28)=FirePan_29
	PanningTextures(29)=FirePan_30
	PanningTextures(30)=FirePan_31
	PanningTextures(31)=FirePan_32
}
