Fixed savegame
This commit is contained in:
@@ -19,13 +19,16 @@ public:
|
||||
void LoadGame(const FString& SlotName = DefaultSaveSlotName);
|
||||
bool SaveGame(const FString& SlotName = DefaultSaveSlotName) const;
|
||||
|
||||
const TArray<FItemSaveRecord>& GetItems() const { return Items; }
|
||||
void AddItem(const FItemSaveRecord& Record);
|
||||
void RemoveItem(const FGuid& InstanceId);
|
||||
|
||||
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
|
||||
|
||||
UGlobalSaveGameData* GetCurrentSave();
|
||||
|
||||
protected:
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void BP_LoadGame();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void BP_SaveGame();
|
||||
|
||||
private:
|
||||
void PopulateStartingData(UGlobalSaveGameData* Save) const;
|
||||
@@ -33,9 +36,6 @@ private:
|
||||
UPROPERTY()
|
||||
FString ActiveSlotName = DefaultSaveSlotName;
|
||||
|
||||
UPROPERTY()
|
||||
TArray<FItemSaveRecord> Items;
|
||||
|
||||
UPROPERTY()
|
||||
TObjectPtr<UGlobalSaveGameData> CurrentSave;
|
||||
};
|
||||
Reference in New Issue
Block a user