added main and pause menus
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user