31 lines
772 B
C++
31 lines
772 B
C++
#pragma once
|
|
|
|
#include "StaticMeshPickup.h"
|
|
#include "HealthPickup.generated.h"
|
|
|
|
UCLASS()
|
|
class NAKATOMI_API AHealthPickup : public AStaticMeshPickup
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
|
float Health = 20.0f;
|
|
|
|
public:
|
|
// Sets default values for this actor's properties
|
|
AHealthPickup();
|
|
|
|
protected:
|
|
// Called when the game starts or when spawned
|
|
virtual void BeginPlay() override;
|
|
|
|
public:
|
|
// Called every frame
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
virtual void OnOverlapBegin(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
|
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep,
|
|
const FHitResult& SweepResult) override;
|
|
};
|