GraczCourier
(RaidVentador_Courier_13)
12
CndCharacter_Master.cpp
#include "Conduit/Character/ch/CndCharacter_Master.h"
// - Initializer Constructor - Default
ACndCharacter_Master::ACndCharacter_Master()
{
BPF_Init_PathAssets();
BPF_Init_DefaultValues();
}
// - Initializer Constructor - Object
ACndCharacter_Master::ACndCharacter_Master(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer
.SetDefaultSubobjectClass<UCndComp_Character_Capsule>(CndKN_CompNames.Character.Capsule)
.SetDefaultSubobjectClass<UCndComp_Character_Mesh>(CndKN_CompNames.Character.Mesh)
.SetDefaultSubobjectClass<UCndComp_Character_Move>(CndKN_CompNames.Character.Move)
.DoNotCreateDefaultSubobject(ACharacter::MeshComponentName)
.DoNotCreateDefaultSubobject(TEXT("Arrow"))
)
{
BPF_Init_SetupComponents();
}
void ACndCharacter_Master::BPF_Init_SetupComponents()
{
CO_CndCharacter_Capsule = CreateDefaultSubobject<UCndComp_Character_Capsule>(CndKN_CompNames.Character.Capsule);
if (CO_CndCharacter_Capsule)
{
CO_CndCharacter_Capsule->SetCapsuleHalfHeight(90.0f);
CO_CndCharacter_Capsule->SetCapsuleRadius(40.0f);
RootComponent = CO_CndCharacter_Capsule;
if (DebugCharacter)
{
UE_LOG(LogTemp, Log, TEXT("CND_DEBUG - Character_Master: CO_CndCharacter_Capsule - Created!"));
}
}
CO_CndCharacter_Mesh = CreateDefaultSubobject<UCndComp_Character_Mesh>(CndKN_CompNames.Character.Mesh);
if (CO_CndCharacter_Mesh)
{
CO_CndCharacter_Mesh->SetupAttachment(CO_CndCharacter_Capsule);
if (DebugCharacter)
{
UE_LOG(LogTemp, Log, TEXT("CND_DEBUG - Character_Master: CO_CndCharacter_Mesh - Created!"));
}
}
CO_CndCharacter_Move = CreateDefaultSubobject<UCndComp_Character_Move>(CndKN_CompNames.Character.Move);
if (CO_CndCharacter_Move)
{
CO_CndCharacter_Move->UpdatedComponent = CO_CndCharacter_Capsule;
if (DebugCharacter)
{
UE_LOG(LogTemp, Log, TEXT("CND_DEBUG - Character_Master: CO_CndCharacter_Move - Created!"));
}
}
}