Files

40 lines
1.6 KiB
C++

#include "PlayerCinematic.h"
#include "NakedDesireCharacter.h"
#include "Kismet/GameplayStatics.h"
#include "NakedDesire/Censorship/CensorshipComponent.h"
#include "NakedDesire/Clothing/ClothingManager.h"
#include "NakedDesire/Clothing/ClothingVisualsComponent.h"
APlayerCinematic::APlayerCinematic()
{
PrimaryActorTick.bCanEverTick = false;
ClothingVisualsComponent = CreateDefaultSubobject<UClothingVisualsComponent>(TEXT("Clothing Visuals Component"));
BoobLCensorship = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Boob L Censorship"));
BoobLCensorship->SetupAttachment(GetMesh(), FName(TEXT("boob_l")));
BoobRCensorship = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Boob R Censorship"));
BoobRCensorship->SetupAttachment(GetMesh(), FName(TEXT("boob_r")));
VaginaCensorship = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Vagina Censorship"));
VaginaCensorship->SetupAttachment(GetMesh(), FName(TEXT("pelvis")));
AnalCensorship = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Anal Censorship"));
AnalCensorship->SetupAttachment(GetMesh(), FName(TEXT("pelvis")));
CensorshipComponent = CreateDefaultSubobject<UCensorshipComponent>(TEXT("Censorship Component"));
}
void APlayerCinematic::BeginPlay()
{
Super::BeginPlay();
Player = Cast<ANakedDesireCharacter>(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0));
if (!Player)
{
return;
}
ClothingVisualsComponent->Initialize(GetMesh(), Player->ClothingManager);
CensorshipComponent->Initialize(Player->ClothingManager, BoobLCensorship, BoobRCensorship, VaginaCensorship, AnalCensorship);
}