2025-10-28 19:58:18 +08:00

38 lines
986 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "ProjectFish/Data/PlayerInfoSaveGame.h"
#include "Subsystems/GameInstanceSubsystem.h"
#include "GameInfoManager.generated.h"
/**
*
*/
UCLASS()
class PROJECTFISH_API UGameInfoManager : public UGameInstanceSubsystem
{
GENERATED_BODY()
public:
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
public:
UFUNCTION(BlueprintCallable)
void NewSaveGame();
UFUNCTION(BlueprintCallable)
void SaveGameInfo();
UFUNCTION(BlueprintCallable)
bool LoadGameInfo();
UFUNCTION(BlueprintCallable)
void CreateGameInfo(UContainerInfo* ShipContainer, UContainerInfo* PlayerContainer);
UFUNCTION(BlueprintCallable)
void CreateGameInfoAndSave(UShapeAsset* ShipContainerShape, UShapeAsset* PlayerContainerShape);
protected:
UPROPERTY(BlueprintReadOnly)
TObjectPtr<class UPlayerInfoSaveGame> PlayerInfo;
static FString SaveGameSlotName;
};