Illusion-UE5/hwanyoung2/Source/hwanyoung2/HYInteractableActor.h
2024-06-17 23:38:43 +09:00

45 lines
1005 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "HYInteractableActor.generated.h"
/*
* Parent class for all interactable actor objects
*/
UCLASS()
class HWANYOUNG2_API AHYInteractableActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AHYInteractableActor();
//this is a Blueprint-only Event; does not have C++ implementation
UFUNCTION(BlueprintNativeEvent)
void Interact(APlayerController* Controller);
virtual void Interact_Implementation(APlayerController* Controller);
UPROPERTY(EditDefaultsOnly)
FString Name;
UPROPERTY(EditDefaultsOnly)
FString Action;
UFUNCTION(BlueprintCallable, Category = "Pickup")
FString GetInteractText() const;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};