UE simple gate function for C++

 void AARStoreInteractiveOBJ::Tick(float DeltaTime)

{

Super::Tick(DeltaTime);


if (sLife > 0)

{

sLife -= DeltaTime;

GEngine->AddOnScreenDebugMessage(-1, .5f, FColor::Black, FString::Printf(TEXT("ARStoreInteractive : %f"), sLife));

InteractionFunction(true, bGateIn);

bGateOut = true;

}

else {

InteractionFunction(false, bGateOut);

bGateIn = true;

}

}


void AARStoreInteractiveOBJ::CursorOn()

{

sLife = LifeSetup;

}


void AARStoreInteractiveOBJ::InteractionFunction(bool bTrue, bool bGate)

{

if (bGate) {

if (bTrue) {

InteractionIntro();

bGateIn = false;

}

else {

InteractionOutro();

bGateOut = false;

}

}

}

댓글

이 블로그의 인기 게시물

About AActor!!! "UObject" has no member "BeginPlay"

UNREAL Android build information

C++ 생성자 위임 (delegating constructor)