From a3120e27f30810e5db6358963aa4ce1b8b56e4b3 Mon Sep 17 00:00:00 2001 From: baz Date: Tue, 21 May 2024 22:06:57 +0100 Subject: [PATCH] Create NakatomiSaveGame class --- Source/Nakatomi/NakatomiSaveGame.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Source/Nakatomi/NakatomiSaveGame.h b/Source/Nakatomi/NakatomiSaveGame.h index c162759..4949b41 100644 --- a/Source/Nakatomi/NakatomiSaveGame.h +++ b/Source/Nakatomi/NakatomiSaveGame.h @@ -3,6 +3,7 @@ #pragma once #include "CoreMinimal.h" +#include "Weapon.h" #include "GameFramework/SaveGame.h" #include "NakatomiSaveGame.generated.h" @@ -13,5 +14,26 @@ UCLASS() class NAKATOMI_API UNakatomiSaveGame : public USaveGame { GENERATED_BODY() + +public: + UPROPERTY(VisibleAnywhere, Category = Basic) + FString PlayerName = "Player Name"; + + UPROPERTY(VisibleAnywhere, Category = Level) + FString LevelName = "Level1"; + + UPROPERTY(VisibleAnywhere, Category = Player) + float PlayerHealth = 100.0f; + + UPROPERTY(VisibleAnywhere, Category = Player) + TArray WeaponInventory; + + UPROPERTY(VisibleAnywhere, Category = Player) + int CurrentInventorySlot = 0; + UFUNCTION(BlueprintCallable) + void ResetPlayerValuesToDefault() + { + PlayerHealth = 100.0f; + } };