From 9bf226b614d5caa03e1edc40a83241d7a35ddf3e Mon Sep 17 00:00:00 2001 From: Louis Hobbs Date: Sat, 24 Jun 2023 15:13:39 +0100 Subject: [PATCH] Add HealthPickup class --- Source/Nakatomi/HealthPickup.cpp | 26 ++++++++++++++++++++++++++ Source/Nakatomi/HealthPickup.h | 23 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 Source/Nakatomi/HealthPickup.cpp create mode 100644 Source/Nakatomi/HealthPickup.h diff --git a/Source/Nakatomi/HealthPickup.cpp b/Source/Nakatomi/HealthPickup.cpp new file mode 100644 index 0000000..cbafab8 --- /dev/null +++ b/Source/Nakatomi/HealthPickup.cpp @@ -0,0 +1,26 @@ + + + +#include "HealthPickup.h" + + +// Sets default values +AHealthPickup::AHealthPickup() +{ + // 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; +} + +// Called when the game starts or when spawned +void AHealthPickup::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void AHealthPickup::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); +} + diff --git a/Source/Nakatomi/HealthPickup.h b/Source/Nakatomi/HealthPickup.h new file mode 100644 index 0000000..4216b8b --- /dev/null +++ b/Source/Nakatomi/HealthPickup.h @@ -0,0 +1,23 @@ +#pragma once + +#include "CoreMinimal.h" +#include "Pickup.h" +#include "HealthPickup.generated.h" + +UCLASS() +class NAKATOMI_API AHealthPickup : public APickup +{ + GENERATED_BODY() + +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; +};