更新背包配置功能
This commit is contained in:
parent
a235d423b5
commit
81629714f7
BIN
ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish-0001.dll
Normal file
BIN
ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish-0001.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,7 +2,7 @@
|
||||
"BuildId": "37670630",
|
||||
"Modules":
|
||||
{
|
||||
"ProjectFish": "UnrealEditor-ProjectFish.dll",
|
||||
"ProjectFishEditor": "UnrealEditor-ProjectFishEditor.dll"
|
||||
"ProjectFish": "UnrealEditor-ProjectFish-0001.dll",
|
||||
"ProjectFishEditor": "UnrealEditor-ProjectFishEditor-0001.dll"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -5,13 +5,22 @@
|
||||
|
||||
#include "ProjectFish/DataAsset/BagConfigAsset.h"
|
||||
|
||||
void UFishingRodConfigSubsystem::CreatePlayerInventory(class UBagShapeAsset* bagShape)
|
||||
void UFishingRodConfigSubsystem::CreateFishingRodInventory(class UBagShapeAsset* FishingRodShape, class UBagShapeAsset* PlayerBagShape)
|
||||
{
|
||||
inventoryConfig = NewObject<UBagConfigAsset>(this);
|
||||
inventoryConfig->BagShapeAsset = bagShape;
|
||||
//鱼竿的技能配置资源
|
||||
fishingRodInventoryConfig = NewObject<UBagConfigAsset>(this);
|
||||
fishingRodInventoryConfig->BagShapeAsset = FishingRodShape;
|
||||
//玩家背包的技能配置资源
|
||||
playerInventoryConfig = NewObject<UBagConfigAsset>(this);
|
||||
playerInventoryConfig->BagShapeAsset = PlayerBagShape;
|
||||
}
|
||||
|
||||
UBagConfigAsset* UFishingRodConfigSubsystem::GetFishingRodInventory()
|
||||
{
|
||||
return this->inventoryConfig;
|
||||
return this->fishingRodInventoryConfig;
|
||||
}
|
||||
|
||||
UBagConfigAsset* UFishingRodConfigSubsystem::GetPlayerInventory()
|
||||
{
|
||||
return playerInventoryConfig;
|
||||
}
|
||||
|
||||
@ -16,11 +16,15 @@ class PROJECTFISH_API UFishingRodConfigSubsystem : public UGameInstanceSubsystem
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable, Category = "PlayerInventorySubsystem")
|
||||
void CreatePlayerInventory(class UBagShapeAsset* bagShape);
|
||||
void CreateFishingRodInventory(class UBagShapeAsset* FishingRodShape, class UBagShapeAsset* PlayerBagShape);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "PlayerInventorySubsystem")
|
||||
UBagConfigAsset* GetFishingRodInventory();
|
||||
UFUNCTION(BlueprintPure, Category = "PlayerInventorySubsystem")
|
||||
UBagConfigAsset* GetPlayerInventory();
|
||||
private:
|
||||
UPROPERTY()
|
||||
class UBagConfigAsset* inventoryConfig = nullptr;
|
||||
class UBagConfigAsset* fishingRodInventoryConfig = nullptr;
|
||||
UPROPERTY()
|
||||
class UBagConfigAsset* playerInventoryConfig = nullptr;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user