diff --git a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll index 69d7a0a..f193e86 100644 Binary files a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll and b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll differ diff --git a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFishEditor.dll b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFishEditor.dll index fd9a355..1432721 100644 Binary files a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFishEditor.dll and b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFishEditor.dll differ diff --git a/ProjectFish/Content/Gameplay/BP_Dabaza_GameMode.uasset b/ProjectFish/Content/Gameplay/BP_Dabaza_GameMode.uasset index e027d8f..1e142c5 100644 Binary files a/ProjectFish/Content/Gameplay/BP_Dabaza_GameMode.uasset and b/ProjectFish/Content/Gameplay/BP_Dabaza_GameMode.uasset differ diff --git a/ProjectFish/Content/Gameplay/Ship/BP_ShipController.uasset b/ProjectFish/Content/Gameplay/Ship/BP_ShipController.uasset index e72cad1..646fada 100644 Binary files a/ProjectFish/Content/Gameplay/Ship/BP_ShipController.uasset and b/ProjectFish/Content/Gameplay/Ship/BP_ShipController.uasset differ diff --git a/ProjectFish/Content/UI/Fishing/Windows/UMG_UnDefeated_Fish_Window.uasset b/ProjectFish/Content/UI/Fishing/Windows/UMG_UnDefeated_Fish_Window.uasset new file mode 100644 index 0000000..7410e7c Binary files /dev/null and b/ProjectFish/Content/UI/Fishing/Windows/UMG_UnDefeated_Fish_Window.uasset differ diff --git a/ProjectFish/Source/ProjectFish/Data/PlayerInfoSaveGame.h b/ProjectFish/Source/ProjectFish/Data/PlayerInfoSaveGame.h index 5edba24..44aae4d 100644 --- a/ProjectFish/Source/ProjectFish/Data/PlayerInfoSaveGame.h +++ b/ProjectFish/Source/ProjectFish/Data/PlayerInfoSaveGame.h @@ -48,4 +48,8 @@ public: // 任务存档数据 UPROPERTY(SaveGame, BlueprintReadWrite, meta = (ToolTip = "任务存档数据")) TArray QuestSaveData; + + //已战胜的鱼 + UPROPERTY(SaveGame, BlueprintReadWrite, meta = (ToolTip = "被击败的鱼")) + TArray Fish_defeated_IDS; }; diff --git a/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.cpp b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.cpp index babe69a..fcea9b0 100644 --- a/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.cpp +++ b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.cpp @@ -102,3 +102,22 @@ void UGameInfoManager::CreateGameInfoAndSave(UShapeAsset* ShipContainerShape, US SaveGameInfo(); } + +bool UGameInfoManager::IsFishDefeated(int32 FishID) +{ + if (!IsValid(PlayerInfo)) + { + return false; + } + return PlayerInfo->Fish_defeated_IDS.Contains(FishID); +} + +void UGameInfoManager::AddDefeatedFish(int32 FishID) +{ + if (!IsValid(PlayerInfo)) + { + PlayerInfo = NewObject(this); + } + PlayerInfo->Fish_defeated_IDS.Add(FishID); + SaveGameInfo(); +} diff --git a/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.h b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.h index c9dc052..adf74ac 100644 --- a/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.h +++ b/ProjectFish/Source/ProjectFish/Gameplay/Subsystem/GameInfoManager.h @@ -29,6 +29,12 @@ public: UFUNCTION(BlueprintCallable) void CreateGameInfoAndSave(UShapeAsset* ShipContainerShape, UShapeAsset* PlayerContainerShape); + + UFUNCTION(BlueprintPure) + bool IsFishDefeated(int32 FishID); + + UFUNCTION(BlueprintCallable) + void AddDefeatedFish(int32 FishID); protected: UPROPERTY(BlueprintReadOnly) TObjectPtr PlayerInfo;