Create NakatomiSaveGame class

This commit is contained in:
baz 2024-05-21 22:06:57 +01:00
parent e475a6a365
commit a3120e27f3
1 changed files with 22 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#pragma once #pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "Weapon.h"
#include "GameFramework/SaveGame.h" #include "GameFramework/SaveGame.h"
#include "NakatomiSaveGame.generated.h" #include "NakatomiSaveGame.generated.h"
@ -14,4 +15,25 @@ class NAKATOMI_API UNakatomiSaveGame : public USaveGame
{ {
GENERATED_BODY() 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<AWeapon*> WeaponInventory;
UPROPERTY(VisibleAnywhere, Category = Player)
int CurrentInventorySlot = 0;
UFUNCTION(BlueprintCallable)
void ResetPlayerValuesToDefault()
{
PlayerHealth = 100.0f;
}
}; };