更新玩家背包默认使用的配置资源
This commit is contained in:
parent
430b533c7e
commit
6677b285b8
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -6,14 +6,15 @@
|
||||
#include "ProjectFish/DataAsset/BagConfigAsset.h"
|
||||
#include "ProjectFish/DataAsset/BagShapeAsset.h"
|
||||
|
||||
void UFishingRodConfigSubsystem::CreateFishingRodInventory(class UBagShapeAsset* FishingRodShape, class UBagShapeAsset* PlayerBagShape)
|
||||
void UFishingRodConfigSubsystem::CreateFishingRodInventory(class UBagShapeAsset* FishingRodShape, class UBagConfigAsset* PlayerBagConfig)
|
||||
{
|
||||
//鱼竿的技能配置资源
|
||||
fishingRodInventoryConfig = NewObject<UBagConfigAsset>(this);
|
||||
fishingRodInventoryConfig->BagShapeAsset = FishingRodShape;
|
||||
//玩家背包的技能配置资源
|
||||
playerInventoryConfig = NewObject<UBagConfigAsset>(this);
|
||||
playerInventoryConfig->BagShapeAsset = PlayerBagShape;
|
||||
// playerInventoryConfig = NewObject<UBagConfigAsset>(this);
|
||||
// playerInventoryConfig->BagShapeAsset = PlayerBagShape;
|
||||
playerInventoryConfig = DuplicateObject<UBagConfigAsset>(PlayerBagConfig, this);
|
||||
}
|
||||
|
||||
UBagConfigAsset* UFishingRodConfigSubsystem::GetFishingRodInventory()
|
||||
|
||||
@ -17,7 +17,7 @@ class PROJECTFISH_API UFishingRodConfigSubsystem : public UGameInstanceSubsystem
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable, Category = "PlayerInventorySubsystem")
|
||||
void CreateFishingRodInventory(class UBagShapeAsset* FishingRodShape, class UBagShapeAsset* PlayerBagShape);
|
||||
void CreateFishingRodInventory(class UBagShapeAsset* FishingRodShape, class UBagConfigAsset* PlayerBagConfig);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "PlayerInventorySubsystem")
|
||||
UBagConfigAsset* GetFishingRodInventory();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user