#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyFountain.generated.h"
UCLASS()
class ARENABATTLE_API AMyFountain : public AActor
{
GENERATED_BODY()
public:
AMyFountain();
protected:
virtual void BeginPlay() override;
public:
virtual void Tick(float DeltaTime) override;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Mesh)
TObjectPtr<class UStaticMeshComponent> Body;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Mesh)
TObjectPtr<class UStaticMeshComponent> Water;
};
#include "Props/MyFountain.h"
#include "Components/StaticMeshComponent.h"
AMyFountain::AMyFountain()
{
PrimaryActorTick.bCanEverTick = true;
Body = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Body"));
Water = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Water"));
RootComponent = Body;
Water->SetupAttachment(Body);
Water->SetRelativeLocation(FVector(0.f, 0.f, 140.f));
static ConstructorHelpers::FObjectFinder<UStaticMesh> BodyMeshRef(TEXT("/Game/ArenaBattle/Environment/Props/SM_Plains_Castle_Fountain_01.SM_Plains_Castle_Fountain_01"));
if (BodyMeshRef.Object) {
Body->SetStaticMesh(BodyMeshRef.Object);
}
static ConstructorHelpers::FObjectFinder<UStaticMesh> WaterMeshRef(TEXT("/Game/ArenaBattle/Environment/Props/SM_Plains_Fountain_02.SM_Plains_Fountain_02"));
if (WaterMeshRef.Object) {
Water->SetStaticMesh(WaterMeshRef.Object);
}
}
void AMyFountain::BeginPlay()
{
Super::BeginPlay();
}
void AMyFountain::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}