This repository has been archived on 2026-05-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
AgrarianGameArchive/Source/AgrarianGame/AgrarianShelterActor.cpp
T

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");
}