更新鱼竿数据的运行时读取
This commit is contained in:
parent
626fb973e4
commit
7790344f1a
Binary file not shown.
@ -6,6 +6,7 @@
|
|||||||
#include "EngineUtils.h"
|
#include "EngineUtils.h"
|
||||||
#include "ProjectFish/Definations.h"
|
#include "ProjectFish/Definations.h"
|
||||||
#include "ProjectFish/PawnWithSkill.h"
|
#include "ProjectFish/PawnWithSkill.h"
|
||||||
|
#include "ProjectFish/Subsystem/FishingRodConfigSubsystem.h"
|
||||||
|
|
||||||
|
|
||||||
// Sets default values for this component's properties
|
// Sets default values for this component's properties
|
||||||
@ -71,8 +72,13 @@ void UFishingRodComponent::BeginPlay()
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//更新鱼竿槽位配置
|
||||||
|
UWorld* World = GetWorld();
|
||||||
|
UGameInstance* GameInstance = World->GetGameInstance();
|
||||||
|
FishRodData.BagConfig = GameInstance->GetSubsystem<UFishingRodConfigSubsystem>()->GetFishingRodInventory();
|
||||||
// ...
|
// ...
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -52,6 +52,8 @@ void USkillManager::AddPawn(class APawnWithSkill* Pawn, FIntPoint BagSize)
|
|||||||
|
|
||||||
void USkillManager::AddBagWithSkills(UBagConfigAsset* Bag, APawnWithSkill* Pawn, TArray<USkill*>& SkillObjects,
|
void USkillManager::AddBagWithSkills(UBagConfigAsset* Bag, APawnWithSkill* Pawn, TArray<USkill*>& SkillObjects,
|
||||||
TArray<FIntPoint>& BagPositions)
|
TArray<FIntPoint>& BagPositions)
|
||||||
|
{
|
||||||
|
if (IsValid(Bag))
|
||||||
{
|
{
|
||||||
FIntPoint BagSize = *PawnInfo.Find(Pawn);
|
FIntPoint BagSize = *PawnInfo.Find(Pawn);
|
||||||
TMap<FIntPoint, int32>* states = PawnBagState.Find(Pawn);
|
TMap<FIntPoint, int32>* states = PawnBagState.Find(Pawn);
|
||||||
@ -71,8 +73,7 @@ void USkillManager::AddBagWithSkills(UBagConfigAsset* Bag, APawnWithSkill* Pawn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void USkillManager::OnAllSkillAdded()
|
void USkillManager::OnAllSkillAdded()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user