c++
#include "Door.h"
// Sets default values
ADoor::ADoor()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
StaticMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMeshComponent"));
RootComponent = StaticMeshComponent;
StaticMeshComponentPart2 = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMeshComponentPart2"));
}
// Called when the game starts or when spawned
void ADoor::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ADoor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
header
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/ArrowComponent.h"
#include "Components/StaticMeshComponent.h"
#include "Door.generated.h"
UCLASS()
class HN_MEMORIES_API ADoor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ADoor();
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
class UStaticMeshComponent* StaticMeshComponent;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
class UStaticMeshComponent* StaticMeshComponentPart2;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
class UArrowComponent* Arrow;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};