54 lines
1.1 KiB
Ucode
54 lines
1.1 KiB
Ucode
|
/**
|
||
|
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
|
||
|
*/
|
||
|
class SeqCond_CompareInt 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() int ValueA;
|
||
|
|
||
|
var() int ValueB;
|
||
|
|
||
|
defaultproperties
|
||
|
{
|
||
|
ObjName="Compare Int"
|
||
|
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_Int',LinkDesc="A",PropertyName=ValueA)
|
||
|
VariableLinks(1)=(ExpectedType=class'SeqVar_Int',LinkDesc="B",PropertyName=ValueB)
|
||
|
}
|