You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902 #ROBOMERGE-BOT: (v613-10869866) [CL 10870584 by ryan durand in Main branch]
29 lines
840 B
C++
29 lines
840 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#include "DelayForFramesLatentAction.h"
|
|
#include "Engine/LatentActionManager.h"
|
|
|
|
FDelayForFramesLatentAction::FDelayForFramesLatentAction(const FLatentActionInfo& LatentInfo, int32 NumFrames)
|
|
: ExecutionFunction(LatentInfo.ExecutionFunction)
|
|
, OutputLink(LatentInfo.Linkage)
|
|
, CallbackTarget(LatentInfo.CallbackTarget)
|
|
, FramesRemaining(NumFrames)
|
|
{
|
|
}
|
|
|
|
FDelayForFramesLatentAction::~FDelayForFramesLatentAction()
|
|
{
|
|
}
|
|
|
|
void FDelayForFramesLatentAction::UpdateOperation(FLatentResponse& Response)
|
|
{
|
|
--FramesRemaining;
|
|
Response.FinishAndTriggerIf(FramesRemaining <= 0, ExecutionFunction, OutputLink, CallbackTarget);
|
|
}
|
|
|
|
#if WITH_EDITOR
|
|
FString FDelayForFramesLatentAction::GetDescription() const
|
|
{
|
|
return FString::Printf(TEXT("Delay (%d frames remaining)"), FramesRemaining);
|
|
}
|
|
#endif
|