4 protected override bool TestFunction(AIAgent owner)
6 if (GetVariableType(
true,
"value1") == GetVariableType(
true,
"value2"))
8 if (GetVariableType(
true,
"value1") ==
int)
12 GetVariableIn(
"value1", value1);
13 GetVariableIn(
"value2", value2);
15 return value1 == value2;
17 else if (GetVariableType(
true,
"value1") ==
float)
21 GetVariableIn(
"value1", val1);
22 GetVariableIn(
"value2", val2);
24 return float.AlmostEqual(val1, val2);
26 else if (GetVariableType(
true,
"value1").
IsInherited(Managed))
30 GetVariableIn(
"value1", val1);
31 GetVariableIn(
"value2", val2);
35 else if (GetVariableType(
true,
"value1") ==
bool)
39 GetVariableIn(
"value1", val1);
40 GetVariableIn(
"value2", val2);
49 protected override bool VisibleInPalette()
54 protected override string GetOnHoverDescription()
56 return "DecoratorScripted_IsEqual: Compares whether the given variables are equal. Supports int-int, float-float, bool - bool and children of Managed comparison";
59 protected static ref TStringArray s_aVarsIn = {
63 protected override TStringArray GetVariablesIn()