diff --git a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll index c119c7b..588a88d 100644 Binary files a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll and b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll differ diff --git a/ProjectFish/Content/Gameplay/BagSystem/BP_BagConfigComponent.uasset b/ProjectFish/Content/Gameplay/BagSystem/BP_BagConfigComponent.uasset index 6f4af6f..693375c 100644 Binary files a/ProjectFish/Content/Gameplay/BagSystem/BP_BagConfigComponent.uasset and b/ProjectFish/Content/Gameplay/BagSystem/BP_BagConfigComponent.uasset differ diff --git a/ProjectFish/Content/UI/Ready/BP_SkillDragOption.uasset b/ProjectFish/Content/UI/Fishing/Ready/BP_SkillDragOption.uasset similarity index 57% rename from ProjectFish/Content/UI/Ready/BP_SkillDragOption.uasset rename to ProjectFish/Content/UI/Fishing/Ready/BP_SkillDragOption.uasset index fa7ddfd..c35bf33 100644 Binary files a/ProjectFish/Content/UI/Ready/BP_SkillDragOption.uasset and b/ProjectFish/Content/UI/Fishing/Ready/BP_SkillDragOption.uasset differ diff --git a/ProjectFish/Content/UI/Ready/UMG_FishingRodConfig.uasset b/ProjectFish/Content/UI/Fishing/Ready/UMG_FishingRodConfig.uasset similarity index 81% rename from ProjectFish/Content/UI/Ready/UMG_FishingRodConfig.uasset rename to ProjectFish/Content/UI/Fishing/Ready/UMG_FishingRodConfig.uasset index f29a075..cc8b5fc 100644 Binary files a/ProjectFish/Content/UI/Ready/UMG_FishingRodConfig.uasset and b/ProjectFish/Content/UI/Fishing/Ready/UMG_FishingRodConfig.uasset differ diff --git a/ProjectFish/Content/UI/Ready/UMG_InventoryGridWidget.uasset b/ProjectFish/Content/UI/Fishing/Ready/UMG_InventoryGridWidget.uasset similarity index 72% rename from ProjectFish/Content/UI/Ready/UMG_InventoryGridWidget.uasset rename to ProjectFish/Content/UI/Fishing/Ready/UMG_InventoryGridWidget.uasset index 19ff8a9..17008e3 100644 Binary files a/ProjectFish/Content/UI/Ready/UMG_InventoryGridWidget.uasset and b/ProjectFish/Content/UI/Fishing/Ready/UMG_InventoryGridWidget.uasset differ diff --git a/ProjectFish/Content/UI/Ready/WBP_SkillIMoveable.uasset b/ProjectFish/Content/UI/Fishing/Ready/WBP_SkillIMoveable.uasset similarity index 54% rename from ProjectFish/Content/UI/Ready/WBP_SkillIMoveable.uasset rename to ProjectFish/Content/UI/Fishing/Ready/WBP_SkillIMoveable.uasset index 727d0dc..73fc852 100644 Binary files a/ProjectFish/Content/UI/Ready/WBP_SkillIMoveable.uasset and b/ProjectFish/Content/UI/Fishing/Ready/WBP_SkillIMoveable.uasset differ diff --git a/ProjectFish/Content/UI/Ready/WBP_SkillIcon.uasset b/ProjectFish/Content/UI/Fishing/Ready/WBP_SkillIcon.uasset similarity index 79% rename from ProjectFish/Content/UI/Ready/WBP_SkillIcon.uasset rename to ProjectFish/Content/UI/Fishing/Ready/WBP_SkillIcon.uasset index 886f891..bfda758 100644 Binary files a/ProjectFish/Content/UI/Ready/WBP_SkillIcon.uasset and b/ProjectFish/Content/UI/Fishing/Ready/WBP_SkillIcon.uasset differ diff --git a/ProjectFish/Content/UI/Fishing/Windows/UMG_ReadyWIndow.uasset b/ProjectFish/Content/UI/Fishing/Windows/UMG_ReadyWIndow.uasset new file mode 100644 index 0000000..804c456 Binary files /dev/null and b/ProjectFish/Content/UI/Fishing/Windows/UMG_ReadyWIndow.uasset differ diff --git a/ProjectFish/Content/UI/Ready/UMG_ReadyWIndow.uasset b/ProjectFish/Content/UI/Ready/UMG_ReadyWIndow.uasset deleted file mode 100644 index 4c2aed3..0000000 Binary files a/ProjectFish/Content/UI/Ready/UMG_ReadyWIndow.uasset and /dev/null differ diff --git a/ProjectFish/ProjectFish.sln.DotSettings.user b/ProjectFish/ProjectFish.sln.DotSettings.user index 8b0af20..b661920 100644 --- a/ProjectFish/ProjectFish.sln.DotSettings.user +++ b/ProjectFish/ProjectFish.sln.DotSettings.user @@ -40,7 +40,9 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded diff --git a/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.cpp b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.cpp new file mode 100644 index 0000000..4f48be0 --- /dev/null +++ b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.cpp @@ -0,0 +1,44 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "GameInfoManager.h" + +#include "Kismet/GameplayStatics.h" + +FString UGameInfoManager::SaveGameSlotName = TEXT("GameInfo"); +void UGameInfoManager::Initialize(FSubsystemCollectionBase& Collection) +{ + Super::Initialize(Collection); + if (!LoadGameInfo()) + { + UE_LOG(LogTemp, Warning, TEXT("本地存档不存在加载失败")); + } +} + +void UGameInfoManager::SaveGameInfo() +{ + if (IsValid(PlayerInfo.Get())) + { + if (UGameplayStatics::SaveGameToSlot(PlayerInfo.Get(), SaveGameSlotName, 0)) + { + UE_LOG(LogTemp, Warning, TEXT("存档保存成功")); + } + else + { + UE_LOG(LogTemp, Warning, TEXT("存档保存失败")); + } + } + else + { + UE_LOG(LogTemp, Warning, TEXT("存档保存失败, PlayerInfo为空")); + } +} + +bool UGameInfoManager::LoadGameInfo() +{ + if (UGameplayStatics::DoesSaveGameExist(SaveGameSlotName, 0)) + { + PlayerInfo = Cast(UGameplayStatics::LoadGameFromSlot(SaveGameSlotName, 0)); + } + return false; +} diff --git a/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.h b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.h new file mode 100644 index 0000000..c6e487e --- /dev/null +++ b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.h @@ -0,0 +1,27 @@ +// 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; + +private: + void SaveGameInfo(); + bool LoadGameInfo(); +protected: + UPROPERTY(BlueprintReadOnly) + TSoftObjectPtr PlayerInfo; + static FString SaveGameSlotName; +};