38 lines
986 B
C
Raw Normal View History

2025-10-18 10:41:43 +08:00
// 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;
2025-10-28 15:29:36 +08:00
public:
2025-10-28 19:58:18 +08:00
UFUNCTION(BlueprintCallable)
void NewSaveGame();
2025-10-20 20:37:52 +08:00
UFUNCTION(BlueprintCallable)
2025-10-18 10:41:43 +08:00
void SaveGameInfo();
2025-10-20 20:37:52 +08:00
UFUNCTION(BlueprintCallable)
2025-10-18 10:41:43 +08:00
bool LoadGameInfo();
2025-10-20 20:37:52 +08:00
UFUNCTION(BlueprintCallable)
2025-10-21 19:33:48 +08:00
void CreateGameInfo(UContainerInfo* ShipContainer, UContainerInfo* PlayerContainer);
UFUNCTION(BlueprintCallable)
void CreateGameInfoAndSave(UShapeAsset* ShipContainerShape, UShapeAsset* PlayerContainerShape);
2025-10-18 10:41:43 +08:00
protected:
UPROPERTY(BlueprintReadOnly)
2025-10-20 20:37:52 +08:00
TObjectPtr<class UPlayerInfoSaveGame> PlayerInfo;
2025-10-28 19:58:18 +08:00
2025-10-18 10:41:43 +08:00
static FString SaveGameSlotName;
};