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

XGame.BodyEffect


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
class BodyEffect extends Effects;

var class<DamageType> DamageType;
var vector HitLoc;

function PostBeginPlay()
{
	local ColorModifier Alpha;
	local float frame, rate;
    local name seq;

	Super.PostBeginPlay();
	LinkMesh(Owner.Mesh);
	Owner.GetAnimParams( 0, seq, frame, rate );
	PlayAnim(seq, 0, 0);
	SetAnimFrame(frame);
	StopAnimating();
	Alpha = ColorModifier(Level.ObjectPool.AllocateObject(class'ColorModifier'));
	Alpha.Material = Skins[0];
	Alpha.AlphaBlend = true;
	Alpha.RenderTwoSided = true;
	Alpha.Color.A = 128;
	Skins[0] = Alpha;
	Skins[1] = Alpha;
	Skins[2] = Alpha;
}

simulated function Tick(float deltaTime)
{
	SetDrawScale(DrawScale * (1 + 0.5*DeltaTime));
	ColorModifier(Skins[0]).Color.A = int(128.f * (LifeSpan / default.LifeSpan));
}

simulated function Destroyed()
{
	if ( xPawn(Owner) != None )
	{
		xPawn(Owner).bFrozenBody = false;
		xPawn(Owner).PlayDyingAnimation(DamageType, HitLoc);
	}
	Level.ObjectPool.FreeObject(Skins[0]);
	Skins[0] = None;
	Skins[1] = None;
	Skins[2] = None;
	Super.Destroyed();
}

defaultproperties
{
     DrawType=DT_Mesh
     LifeSpan=0.650000
     Skins(0)=Shader'XGameShaders.PlayerShaders.LinkHit'
     Skins(1)=Shader'XGameShaders.PlayerShaders.LinkHit'
     Skins(2)=Shader'XGameShaders.PlayerShaders.LinkHit'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: pr 5-2-2018 12:35:50.000 - Creation time: sk 18-3-2018 09:50:03.868 - Created with UnCodeX