23 lines
836 B
C++
23 lines
836 B
C++
// Copyright Pacificao. All Rights Reserved.
|
|
|
|
#include "AgrarianShelterActor.h"
|
|
#include "AgrarianPersistentActorComponent.h"
|
|
#include "Components/BoxComponent.h"
|
|
#include "Components/StaticMeshComponent.h"
|
|
|
|
AAgrarianShelterActor::AAgrarianShelterActor()
|
|
{
|
|
bReplicates = true;
|
|
|
|
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
|
RootComponent = Mesh;
|
|
|
|
ProtectionVolume = CreateDefaultSubobject<UBoxComponent>(TEXT("ProtectionVolume"));
|
|
ProtectionVolume->SetupAttachment(RootComponent);
|
|
ProtectionVolume->SetBoxExtent(FVector(250.0f, 250.0f, 180.0f));
|
|
ProtectionVolume->SetCollisionProfileName(TEXT("OverlapAllDynamic"));
|
|
|
|
PersistentActorComponent = CreateDefaultSubobject<UAgrarianPersistentActorComponent>(TEXT("PersistentActorComponent"));
|
|
PersistentActorComponent->ActorTypeId = TEXT("primitive_shelter");
|
|
}
|