Files
Naked-Desire/Source/NakedDesire/Player/PlayerCinematic.cpp
T
2026-06-03 15:16:46 +03:00

27 lines
667 B
C++

#include "PlayerCinematic.h"
#include "NakedDesireCharacter.h"
#include "Kismet/GameplayStatics.h"
#include "NakedDesire/Clothing/ClothingManager.h"
#include "NakedDesire/Clothing/ClothingVisualsComponent.h"
APlayerCinematic::APlayerCinematic()
{
PrimaryActorTick.bCanEverTick = false;
ClothingVisualsComponent = CreateDefaultSubobject<UClothingVisualsComponent>(TEXT("Clothing Visuals Component"));
}
void APlayerCinematic::BeginPlay()
{
Super::BeginPlay();
Player = Cast<ANakedDesireCharacter>(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0));
if (!Player)
{
return;
}
ClothingVisualsComponent->Initialize(GetMesh(), Player->ClothingManager);
}