3 [
Attribute(
"10", UIWidgets.EditBox,
"Time")]
7 protected float elapsedTime;
8 protected bool isInfinite;
11 override void OnEnter(AIAgent owner)
13 if (GetVariableType(
true,
"Time") ==
float)
15 GetVariableIn(
"Time",
m_Time);
22 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
25 GetVariableIn(
"ResetTime", reset);
29 SetVariableOut(
"ResetTimeOut",
false);
33 if (GetVariableType(
false,
"Trigger") ==
bool)
35 bool res = (elapsedTime >
m_Time && !isInfinite);
36 SetVariableOut(
"Trigger", res);
39 if (GetVariableType(
false,
"ElapsedTime") ==
float)
41 SetVariableOut(
"ElapsedTime", elapsedTime);
44 if (elapsedTime >
m_Time && !isInfinite)
49 return ENodeResult.SUCCESS;
53 override bool VisibleInPalette()
59 protected override string GetOnHoverDescription()
61 return "Task Timer: For triggering into output variable after specified time.";
65 protected static ref TStringArray s_aVarsIn = {
69 override TStringArray GetVariablesIn()
75 protected static ref TStringArray s_aVarsOut = {
80 override TStringArray GetVariablesOut()