Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UT2k4AssaultFull.FX_LinkTurretShield


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
//=============================================================================
// FX_LinkTurretShield
//=============================================================================
// Created by Laurent Delayen
// © 2003, Epic Games, Inc.  All Rights Reserved
//=============================================================================

class FX_LinkTurretShield extends Actor;

var float	Flash;
var bool	bSetUp;

#exec load obj FILE=JWAssaultMeshes

simulated function PostBeginPlay()
{
	local ColorModifier Alpha;

	super.PostBeginPlay();

	if ( Level.NetMode == NM_DedicatedServer )
		return;

	Alpha = ColorModifier(Level.ObjectPool.AllocateObject(class'ColorModifier'));
	Alpha.Material = Skins[0];
	Alpha.AlphaBlend = true;
	Alpha.RenderTwoSided = true;
	Alpha.Color.G = 255;
	Alpha.Color.A = 255;
	Skins[0] = Alpha;

	//Skins[1] = Alpha;
	//Skins[2] = Alpha;

	UpdateShieldColor();
	bSetUp = true;
}

simulated function Destroyed()
{
	if ( bSetUp )
	{
		Level.ObjectPool.FreeObject(Skins[0]);
		Skins[0] = None;
	}

	super.Destroyed();
}

simulated function SetOpacity( float pct )
{
	if ( !bSetUp )
		return;

	if ( pct < 0.01 )
	{
		bHidden = true;
		return;
	}

	bHidden = false;
	
	ColorModifier(Skins[0]).Color.A = 255 * pct;
}

simulated function DoFlash()
{
	Flash = 255;
}

simulated function Tick(float deltaTime)
{
	if ( Level.NetMode == NM_DedicatedServer )
	{
		Disable('Tick');
		return;
    }

	if ( bHidden || Flash <= 0)
		return;

	Flash -= (256 * deltatime);

	if ( Flash > 0 )
		UpdateShieldColor();
}

simulated function UpdateShieldColor()
{
	ColorModifier(Skins[0]).Color.R = 0;
	ColorModifier(Skins[0]).Color.G = 255 - int(Flash);
	ColorModifier(Skins[0]).Color.B = int(Flash);
}

defaultproperties
{
	LifeSpan=0
	DrawType=DT_StaticMesh
    StaticMesh=staticMesh'LinkTurretShield'
	DrawScale=0.33
    DrawScale3D=(X=1,Y=1.1,Z=1.1)
	PrePivot=(X=109)
    bHidden=false
	bNetTemporary=false
    bReplicateInstigator=true

	RemoteRole=ROLE_None
	bNetInitialRotation=true

	bHardAttach=true
	Skins(0)=AS_FX_TX.WhiteShield_FB
	Skins(1)=AS_FX_TX.WhiteShield_FB
	Skins(2)=AS_FX_TX.WhiteShield_FB
	bUnlit=true
	bOwnerNoSee=true
	AmbientGlow=250
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:36:14.000 - Creation time: Do 14.8.2014 09:58:39.158 - Created with UnCodeX