Iteration on Bazaar UI and gamepad usability
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Scripts/Bazar/WBP_BazaarUpgradeCard.uasset
LFS
Normal file
BIN
Content/Scripts/Bazar/WBP_BazaarUpgradeCard.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -118,6 +118,14 @@
|
|||||||
{
|
{
|
||||||
"Name": "GameplayStateTree",
|
"Name": "GameplayStateTree",
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "ModelContextProtocol",
|
||||||
|
"Enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "MCPClientToolset",
|
||||||
|
"Enabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"TargetPlatforms": [
|
"TargetPlatforms": [
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "BazarSellingStand.h"
|
#include "BazarSellingStand.h"
|
||||||
|
|
||||||
|
#include "ProjectEleri/Data/BazarSettingsDataAsset.h"
|
||||||
|
|
||||||
void ABazarSellingStand::BeginPlay()
|
void ABazarSellingStand::BeginPlay()
|
||||||
{
|
{
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
@@ -12,3 +14,19 @@ void ABazarSellingStand::BeginPlay()
|
|||||||
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ABazarSellingStand::FindBazaarUpgrade(const FGameplayTag& Tag, FBazaarUpgradeData& OutUpgrade)
|
||||||
|
{
|
||||||
|
if (!BazarSettingsDataAsset.IsValid()) return false;
|
||||||
|
|
||||||
|
for (const FBazaarUpgradeData& Upgrade : BazarSettingsDataAsset->UpgradeArray)
|
||||||
|
{
|
||||||
|
if (Tag == Upgrade.UpgradeTag)
|
||||||
|
{
|
||||||
|
OutUpgrade = Upgrade;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "ProjectEleri/GameObjects/EleriBaseActor.h"
|
#include "ProjectEleri/GameObjects/EleriBaseActor.h"
|
||||||
#include "BazarSellingStand.generated.h"
|
#include "BazarSellingStand.generated.h"
|
||||||
|
|
||||||
|
struct FBazaarUpgradeData;
|
||||||
class UBazarSettingsDataAsset;
|
class UBazarSettingsDataAsset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,5 +23,10 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category = "Bazaar")
|
||||||
|
bool FindBazaarUpgrade(const FGameplayTag& Tag, FBazaarUpgradeData& OutUpgrade);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ float UBazarSettingsDataAsset::GetUpgradeBenefitAmount(const FGameplayTag& Tag,
|
|||||||
{
|
{
|
||||||
if (!Tag.IsValid() || Level > 10 || Level < 0) return 0.f;
|
if (!Tag.IsValid() || Level > 10 || Level < 0) return 0.f;
|
||||||
|
|
||||||
for (auto Upgrade : UpgradeArray)
|
for (const FBazaarUpgradeData& Upgrade : UpgradeArray)
|
||||||
{
|
{
|
||||||
if (Tag == Upgrade.UpgradeTag)
|
if (Tag == Upgrade.UpgradeTag)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user