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

UTGame.UTAnimBlendByWeapon


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
/**
 * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
 */
class UTAnimBlendByWeapon extends AnimNodeBlendPerBone
	native(Animation);

/** Is this weapon playing a looped anim */
var(Animation) bool bLooping;
/** If set, after the fire anim completes this anim is looped instead of looping the fire anim */
var(Animation) name LoopingAnim;
/** Blend Times */
var(Animation) float BlendTime;

// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)

/** Call to trigger the fire sequence. It will blend to the fire animation.
	If bAutoFire is specified, if LoopSequence is 'None' or unspecified, FireSequence will be looped, otherwise FireSequence
	will be played once and LoopSequence will be looped after that */
function AnimFire(name FireSequence, bool bAutoFire, optional float AnimRate, optional float SpecialBlendTime, optional name LoopSequence = LoopingAnim)
{
	local AnimNodeSequence FireNode;

	// Fix the rate
	if (AnimRate == 0)
	{
		AnimRate = 1.0;
	}

	if (SpecialBlendTime == 0.0f)
	{
		SpecialBlendtime = BlendTime;
	}

	// Activate the child node
	SetBlendTarget(1, SpecialBlendtime);

	// Restart the sequence
	FireNode = AnimNodeSequence(Children[1].Anim);
	if (FireNode != None)
	{
		FireNode.SetAnim(FireSequence);
		FireNode.PlayAnim(bAutoFire && LoopSequence == 'None', AnimRate);
	}

	bLooping = bAutoFire;
	LoopingAnim = LoopSequence;
}

/** Blends out the fire animation
	This event is called automatically for non-looping fire animations; otherwise it must be called manually */
event AnimStopFire(optional float SpecialBlendTime)
{
	local AnimNodeSequence FireNode;

	if (SpecialBlendTime == 0.0f)
	{
		SpecialBlendTime = BlendTime;
	}

	SetBlendTarget(0, SpecialBlendTime);

	FireNode = AnimNodeSequence(Children[1].Anim);
	if (FireNode != None)
	{
		FireNode.StopAnim();
	}

	bLooping = false;
}

defaultproperties
{
   BlendTime=0.150000
   Children(0)=(Name="Not-Firing")
   Children(1)=(Name="Firing")
   Name="Default__UTAnimBlendByWeapon"
   ObjectArchetype=AnimNodeBlendPerBone'Engine.Default__AnimNodeBlendPerBone'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:18:24.000 - Creation time: sk 18-3-2018 10:01:18.669 - Created with UnCodeX