diff --git a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish-0001.dll b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish-0001.dll index 1ac8f7d..0236da7 100644 Binary files a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish-0001.dll and b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish-0001.dll differ diff --git a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish.dll index aa4df89..137cbd4 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-0001.dll b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFishEditor-0001.dll index e2dba73..74ed981 100644 Binary files a/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFishEditor-0001.dll and b/ProjectFish/Binaries/Win64/UnrealEditor-ProjectFishEditor-0001.dll differ diff --git a/ProjectFish/Config/DefaultEngine.ini b/ProjectFish/Config/DefaultEngine.ini index 15dff50..179cdfd 100644 --- a/ProjectFish/Config/DefaultEngine.ini +++ b/ProjectFish/Config/DefaultEngine.ini @@ -95,6 +95,7 @@ ManualIPAddress= [CoreRedirects] +ClassRedirects=(OldName="/Script/ProjectFish.Skill_Pull",NewName="/Script/ProjectFish.SkillEffect_Damage") +ClassRedirects=(OldName="/Script/ProjectFish.SkillEffect_Pull",NewName="/Script/ProjectFish.SkillEffect_Damage") ++ClassRedirects=(OldName="/Script/ProjectFish.PlayerInventorySubsystem",NewName="/Script/ProjectFish.FishingRodConfigSubsystem") [/Script/Engine.CollisionProfile] -Profiles=(Name="NoCollision",CollisionEnabled=NoCollision,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="No collision",bCanModify=False) diff --git a/ProjectFish/ProjectFish.sln.DotSettings.user b/ProjectFish/ProjectFish.sln.DotSettings.user index 18222b5..48f7543 100644 --- a/ProjectFish/ProjectFish.sln.DotSettings.user +++ b/ProjectFish/ProjectFish.sln.DotSettings.user @@ -8,4 +8,7 @@ ForceIncluded ForceIncluded ForceIncluded - ForceIncluded \ No newline at end of file + ForceIncluded + ForceIncluded + ForceIncluded + ForceIncluded \ No newline at end of file diff --git a/ProjectFish/Source/ProjectFish/Gameplay/Ship/Shipbase.h b/ProjectFish/Source/ProjectFish/Gameplay/Ship/Shipbase.h index 62f0a15..0df0b4a 100644 --- a/ProjectFish/Source/ProjectFish/Gameplay/Ship/Shipbase.h +++ b/ProjectFish/Source/ProjectFish/Gameplay/Ship/Shipbase.h @@ -107,8 +107,14 @@ protected: UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) class UInputAction* FishingAction; - + /*** Invenroty ***/ + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Inventory, meta = (AllowPrivateAccess = "true", ToolTip = "玩家背包携带的技能")) + class UBagConfigAsset* DefaultPlayerBag; + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Inventory, meta = (AllowPrivateAccess = "true", ToolTip = "鱼竿装备槽形状")) + class UBagShapeAsset* FishingRodShape; + + private: FTimerHandle FishingTimerHandle; bool bIsFishing = false;; diff --git a/ProjectFish/Source/ProjectFish/Subsystem/FishingRodConfigSubsystem.cpp b/ProjectFish/Source/ProjectFish/Subsystem/FishingRodConfigSubsystem.cpp new file mode 100644 index 0000000..91a0795 --- /dev/null +++ b/ProjectFish/Source/ProjectFish/Subsystem/FishingRodConfigSubsystem.cpp @@ -0,0 +1,17 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "FishingRodConfigSubsystem.h" + +#include "ProjectFish/DataAsset/BagConfigAsset.h" + +void UFishingRodConfigSubsystem::CreatePlayerInventory(class UBagShapeAsset* bagShape) +{ + inventoryConfig = NewObject(this); + inventoryConfig->BagShapeAsset = bagShape; +} + +UBagConfigAsset* UFishingRodConfigSubsystem::GetFishingRodInventory() +{ + return this->inventoryConfig; +} diff --git a/ProjectFish/Source/ProjectFish/Subsystem/FishingRodConfigSubsystem.h b/ProjectFish/Source/ProjectFish/Subsystem/FishingRodConfigSubsystem.h new file mode 100644 index 0000000..1cd78e7 --- /dev/null +++ b/ProjectFish/Source/ProjectFish/Subsystem/FishingRodConfigSubsystem.h @@ -0,0 +1,24 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Subsystems/GameInstanceSubsystem.h" +#include "FishingRodConfigSubsystem.generated.h" + +/** + * + */ +UCLASS() +class PROJECTFISH_API UFishingRodConfigSubsystem : public UGameInstanceSubsystem +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, Category = "PlayerInventorySubsystem") + void CreatePlayerInventory(class UBagShapeAsset* bagShape); + UFUNCTION(BlueprintPure, Category = "PlayerInventorySubsystem") + UBagConfigAsset* GetFishingRodInventory(); +private: + class UBagConfigAsset* inventoryConfig = nullptr; +};