Files
LuckyWorld/Source/LuckyWorldV2/Private/Gameplay/NaviSplineCreator.cpp

36 lines
824 B
C++
Raw Normal View History

2025-04-14 19:36:02 +08:00
// Fill out your copyright notice in the Description page of Project Settings.
#include "Gameplay/NaviSplineCreator.h"
#include "Core/LuckyRobotsGameInstance.h"
// Sets default values
ANaviSplineCreator::ANaviSplineCreator()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
}
// Called when the game starts or when spawned
void ANaviSplineCreator::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ANaviSplineCreator::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
void ANaviSplineCreator::UpdateSplineVisibility()
{
ULuckyRobotsGameInstance* GameInstance = Cast<ULuckyRobotsGameInstance>(GetGameInstance());
if (GameInstance)
{
SetActorHiddenInGame(!GameInstance->bIsShowPath);
}
}