44 lines
1.1 KiB
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);
UFUNCTION(BlueprintPure)
bool IsFishDefeated(int32 FishID);
UFUNCTION(BlueprintCallable)
void AddDefeatedFish(int32 FishID);
protected:
UPROPERTY(BlueprintReadOnly)
TObjectPtr<class UPlayerInfoSaveGame> PlayerInfo;
static FString SaveGameSlotName;
};