MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / SetTimer

Method SetTimer

Source/Flow/Private/Nodes/Route/FlowNode_Timer.cpp:71–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void UFlowNode_Timer::SetTimer()
72{
73 if (GetWorld())
74 {
75 if (StepTime > 0.0f)
76 {
77 GetWorld()->GetTimerManager().SetTimer(StepTimerHandle, this, &UFlowNode_Timer::OnStep, StepTime, true);
78 }
79
80 ResolvedCompletionTime = ResolveCompletionTime();
81 if (ResolvedCompletionTime > UE_KINDA_SMALL_NUMBER)
82 {
83 GetWorld()->GetTimerManager().SetTimer(CompletionTimerHandle, this, &UFlowNode_Timer::OnCompletion, ResolvedCompletionTime, false);
84 }
85 else
86 {
87 GetWorld()->GetTimerManager().SetTimerForNextTick(this, &UFlowNode_Timer::OnCompletion);
88 }
89 }
90 else
91 {
92 LogError(TEXT("No valid world"));
93 TriggerOutput(TEXT("Completed"), true);
94 }
95}
96
97void UFlowNode_Timer::Restart()
98{

Callers 1

OnLoad_ImplementationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected