Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////// HEALTH.H
- #pragma once
- #include "Pickup.h"
- #include "Health.generated.h"
- UCLASS()
- class MYPROJECTCPP_API AHealth : public APickup
- {
- GENERATED_BODY()
- public:
- AHealth();
- UFUNCTION(BlueprintCallable, Category = "OnPickup")
- void OnPickup();
- protected:
- // Methods
- UFUNCTION(BlueprintCallable, Category = "Health")
- int32 CalculateFinalHealth(int32 PlayerHealth, int32 AddingHealth);
- };
- //////////////////////////// HEALTH.CPP
- // Fill out your copyright notice in the Description page of Project Settings.
- #include "MyProjectCPP.h"
- #include "Health.h"
- #include "Engine.h"
- void AHealth::OnPickup()
- {
- GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("HEALTH PICKED!")));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement