class GoldShine expands Effects;

#exec TEXTURE IMPORT NAME=GoldShine FILE=SKINS\GoldShine.bmp GROUP=Coronas FLAGS=2

var() vector PrePivotDelta;
var() float MaxDrawScale;
var bool bShine;
var float Count;

simulated function PostBeginPlay()
{
	SetTimer(0.2, False);
}


simulated function Timer()
{
	bShine = True;
	SetTimer(FRand() + 0.1, True);
}

simulated function Tick( float DeltaTime)
{
local vector X, Y, Z;

	GetAxes(Owner.Rotation, X, Y, Z);
	PrePivot = PrePivotDelta.X*X + PrePivotDelta.Y*Y + PrePivotDelta.Z*Z;

	if (bShine && Count<=0.3)
	{
		Count += DeltaTime;
		ScaleGlow = Default.ScaleGlow * Count * 2;
		DrawScale = MaxDrawScale * Count * 2;
	}
	if (bShine && Count>0.3)
	{
		bShine = False;
	}
	if (!bShine && Count>0)
	{
		Count -= DeltaTime;
		ScaleGlow = Default.ScaleGlow * Count * 2;
		DrawScale = MaxDrawScale * Count * 2;
	}

	bHidden = (Count<=0 || Owner.bHidden);
}

defaultproperties
{
	DrawType=DT_Sprite
	RemoteRole=ROLE_None
	Texture=GoldShine
	bUnlit=True
	Style=STY_Translucent
	DrawScale=0.040000
	Physics=PHYS_Trailer
	ScaleGlow=2.000000
	LifeSpan=0.000000
	SpriteProjForward=16.000000
	bTrailerPrePivot=True
	bTrailerSameRotation=True
}

