added main and pause menus

This commit is contained in:
2026-06-05 20:00:33 +03:00
parent 0792f7cdfd
commit 61d5a57d8d
53 changed files with 1402 additions and 49 deletions
@@ -9,6 +9,7 @@
#include "NakedDesire/Items/ItemDefinition.h"
#include "NakedDesire/Items/ItemInstance.h"
#include "NakedDesire/Global/NakedDesireGameInstance.h"
#include "Kismet/GameplayStatics.h"
void USaveSubsystem::LoadGame(const FString& SlotName)
{
@@ -27,6 +28,20 @@ void USaveSubsystem::Initialize(FSubsystemCollectionBase& Collection)
LoadGame();
}
bool USaveSubsystem::DoesSaveExist() const
{
return UGameplayStatics::DoesSaveGameExist(ActiveSlotName, SLOT_PLAYER);
}
void USaveSubsystem::StartNewGame()
{
UGameplayStatics::DeleteGameInSlot(ActiveSlotName, SLOT_PLAYER);
CurrentSave = UGlobalSaveGameData::CreateNewSaveGame();
PopulateStartingData(CurrentSave);
UGlobalSaveGameData::SaveGame(CurrentSave, ActiveSlotName);
}
UGlobalSaveGameData* USaveSubsystem::GetCurrentSave()
{
if (!CurrentSave)