1
0
KF2-Dev-Scripts/Engine/Classes/SeqCond_CompareFloat.uc

54 lines
1.1 KiB
Ucode
Raw Normal View History

2020-12-13 15:01:13 +00:00
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class SeqCond_CompareFloat extends SequenceCondition
native(Sequence);
cpptext
{
void Activated()
{
// compare the values and set appropriate output impulse
if (ValueA <= ValueB)
{
OutputLinks(0).bHasImpulse = TRUE;
}
if (ValueA > ValueB)
{
OutputLinks(1).bHasImpulse = TRUE;
}
if (ValueA == ValueB)
{
OutputLinks(2).bHasImpulse = TRUE;
}
if (ValueA < ValueB)
{
OutputLinks(3).bHasImpulse = TRUE;
}
if (ValueA >= ValueB)
{
OutputLinks(4).bHasImpulse = TRUE;
}
}
};
var() float ValueA;
var() float ValueB;
defaultproperties
{
ObjName="Compare Float"
ObjCategory="Comparison"
InputLinks(0)=(LinkDesc="In")
OutputLinks(0)=(LinkDesc="A <= B")
OutputLinks(1)=(LinkDesc="A > B")
OutputLinks(2)=(LinkDesc="A == B")
OutputLinks(3)=(LinkDesc="A < B")
OutputLinks(4)=(LinkDesc="A >= B")
VariableLinks(0)=(ExpectedType=class'SeqVar_Float',LinkDesc="A",PropertyName=ValueA)
VariableLinks(1)=(ExpectedType=class'SeqVar_Float',LinkDesc="B",PropertyName=ValueB)
}