27 lines
667 B
C++
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);
|
|
} |