Added New Bounty Tab for Game Over State

This commit is contained in:
Rafal Swierczek 2024-02-22 16:07:03 +00:00
parent 20c331e8a3
commit b6fb2da0ca
8 changed files with 30 additions and 27 deletions

View File

@ -8,19 +8,9 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment=""> <list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Content/PauseMenu/Tabs/BountyTabs/WBP_BountiesTab.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/PauseMenu/Tabs/BountyTabs/WBP_BountiesTab.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/BountySystem/ControlsTutorial/Bounty/MB_Training.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/BountySystem/ControlsTutorial/Bounty/MB_Training.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/PauseMenu/WBP_PauseMenu.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/PauseMenu/WBP_PauseMenu.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/BountyClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/BountyClass.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/SideBountyClass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/SideBountyClass.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/SideBountyClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/SideBountyClass.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/EVGameInstance.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/EVGameInstance.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/MainSaveGameClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/MainSaveGameClass.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/PauseMenuClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/PauseMenuClass.h" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -152,7 +142,7 @@
<workItem from="1708180486567" duration="2641000" /> <workItem from="1708180486567" duration="2641000" />
<workItem from="1708269543495" duration="2914000" /> <workItem from="1708269543495" duration="2914000" />
<workItem from="1708434176965" duration="6053000" /> <workItem from="1708434176965" duration="6053000" />
<workItem from="1708607826264" duration="1417000" /> <workItem from="1708607826264" duration="2343000" />
</task> </task>
<servers /> <servers />
</component> </component>

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:3694f536232bf3750318bbed8aaa9f5ef454bc0ab781c44d71dfce238190b7ef oid sha256:6e2442a58e7951896cedb4ae2893b6a7fbb5744b2065839f55e19e6b5068d64a
size 465881 size 466129

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:0eabe94afd4d0ed0714040bb9e4cb78dac1690091a79824373b9153923ca8707 oid sha256:94e3c498fcbc9f637d1601f0db6d73a10187278939d87f1726bde8639f39f51d
size 263209 size 262166

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ad4f17e3d6213bec771bc4dabb5a29ec90224cb11271d025c17727de47ff249e
size 141428

View File

@ -62,11 +62,6 @@ void ABountyHunterCharacter::CompletedASideBounty(int CompletedSideBountiesUID)
} }
} }
void ABountyHunterCharacter::AllBountiesCompleted()
{
UE_LOG(LogTemp, Warning, TEXT("Game Completed!!!! No more Bounties left... or you forgot to set a bounty at one of the indexes oof"));
}
void ABountyHunterCharacter::SavePlayerMoneyAndFavours() void ABountyHunterCharacter::SavePlayerMoneyAndFavours()
{ {
UEVGameInstance* GI = Cast<UEVGameInstance>(GetGameInstance()); UEVGameInstance* GI = Cast<UEVGameInstance>(GetGameInstance());
@ -137,7 +132,12 @@ void ABountyHunterCharacter::EndPlay(const EEndPlayReason::Type EndPlayReason)
void ABountyHunterCharacter::CreatePauseMenuTabs() void ABountyHunterCharacter::CreatePauseMenuTabs()
{ {
if (CurrentMainBountyIndex <= 0) if (CompletedMainBounties)
{
BountiesTab = CreateWidget<UBountiesTab>(GetWorld(), GameOverBountyTabWidgetClass);
BountiesTab->TrackSideBountyDelegate.AddDynamic(this, &ABountyHunterCharacter::TrackSideBounty);
}
else if (CurrentMainBountyIndex <= 0)
{ {
BountiesTab = CreateWidget<UBountiesTab>(GetWorld(), TutorialBountyTabWidgetClass); BountiesTab = CreateWidget<UBountiesTab>(GetWorld(), TutorialBountyTabWidgetClass);
} }

View File

@ -47,6 +47,9 @@ class ENDLESSVENDETTA_API ABountyHunterCharacter : public AEndlessVendettaCharac
UPROPERTY(EditDefaultsOnly, Category = "Bounty Hunter") UPROPERTY(EditDefaultsOnly, Category = "Bounty Hunter")
FString OpenWorldLevelName = "ControlTutorialLevel"; FString OpenWorldLevelName = "ControlTutorialLevel";
// Used to Check if all Main Bounties have been completed by the Bounties Tab
bool CompletedMainBounties = false;
protected: protected:
public: public:
@ -67,7 +70,10 @@ private:
void CompletedASideBounty(int CompletedSideBountiesUID); void CompletedASideBounty(int CompletedSideBountiesUID);
// Replaces Normal Bounty Info UI with Unique Game Over UI // Replaces Normal Bounty Info UI with Unique Game Over UI
void AllBountiesCompleted(); void AllBountiesCompleted()
{
CompletedMainBounties = true;
}
void SavePlayerMoneyAndFavours(); void SavePlayerMoneyAndFavours();
@ -149,6 +155,10 @@ private:
UPROPERTY(EditDefaultsOnly, Category = "Pause Menu") UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
TSubclassOf<UBountiesTab> TutorialBountyTabWidgetClass; TSubclassOf<UBountiesTab> TutorialBountyTabWidgetClass;
// Widget Class used to Spawn Bounties Tab Widget
UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
TSubclassOf<UBountiesTab> GameOverBountyTabWidgetClass;
// Reference to Bounty Tab Widget // Reference to Bounty Tab Widget
UPROPERTY() UPROPERTY()
UBountiesTab* BountiesTab; UBountiesTab* BountiesTab;