diff --git a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml index 106f5ef3..f34626d0 100644 --- a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml +++ b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml @@ -9,12 +9,16 @@ - - + + + + + + + - diff --git a/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay.png b/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay.png new file mode 100644 index 00000000..4566c52c --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07f654e9dadc7d84b853ddbb1d02b449733e292aef7ab06c1d9464edd16c4777 +size 155694 diff --git a/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay.uasset b/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay.uasset new file mode 100644 index 00000000..156f653e --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df5972b4e2ba2c91707cf0680d471eb4b706c0714054f1f796fa6c177794daae +size 104438 diff --git a/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay2.png b/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay2.png new file mode 100644 index 00000000..29317118 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd4713c9e8580e2bec40b43596878bdd0ebbd63bcf07ff0ab0700d0dc460f16e +size 224309 diff --git a/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay2.uasset b/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay2.uasset new file mode 100644 index 00000000..a749afad --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/CheckpointTips/TipDisplay2.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7528286ed5f4e17abfd0ce87f135d4d28f9bf8ee1c0e24fcb9e16302502b39cf +size 157733 diff --git a/EndlessVendetta/Content/BountySystem/CheckpointTips/WBP_CheckpointTip.uasset b/EndlessVendetta/Content/BountySystem/CheckpointTips/WBP_CheckpointTip.uasset new file mode 100644 index 00000000..f9c9caf2 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/CheckpointTips/WBP_CheckpointTip.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:589ad499ba939572354532cd8b28455b66311ce122f4b1ffa5429204533b6d19 +size 101358 diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset index 87ad6007..722ba7d9 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e2442a58e7951896cedb4ae2893b6a7fbb5744b2065839f55e19e6b5068d64a -size 466129 +oid sha256:2e738a26375c1724f07f3c945925628d9338c28057abedad8ec11cadc6198dae +size 475901 diff --git a/EndlessVendetta/Content/Levels/MainMenuLevel.umap b/EndlessVendetta/Content/Levels/MainMenuLevel.umap index 04cdefe0..f406c7a6 100644 --- a/EndlessVendetta/Content/Levels/MainMenuLevel.umap +++ b/EndlessVendetta/Content/Levels/MainMenuLevel.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa952eb25972ab6e6dca1d46cf254f62d1684ba665ee45a7c3d6a8e3527ffac1 +oid sha256:ce714c1367e0d2d8ef9fce14d5f34b7544d6b549f014dc1059dd51a3375ee080 size 308710 diff --git a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset index 64bcf76d..c2a34afc 100644 --- a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset +++ b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:769c1886c9631ccadb663c8fad5e3454f361f5bd99f6a49cf1646f88e0f267a9 -size 14831 +oid sha256:4c0ecf0ac0702cc2bd355ec050232a61c49e10f102448efbeb735a51824adef6 +size 14948 diff --git a/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset b/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset index c5c3b84e..8539fe9d 100644 --- a/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset +++ b/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a60a29ad596546d481e43dfb8698842a78cc07f4a4b1000fa397cfba4e72331 -size 158206 +oid sha256:7f70d740d293e87406d7c302da36f402b94ab1e47c9d8ea4e00333d62df59a1f +size 43745 diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.cpp b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.cpp index b6678d31..c431d94a 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.cpp @@ -17,6 +17,7 @@ void ABountyClass::ActivateFirstCheckpoint() BountyCheckpoints[0]->Active = true; BountyCheckpoints[0]->CompletedCheckpoint.AddDynamic(this, &ABountyClass::IncrementBountyCheckpoint); + CheckpointActivated.Broadcast(BountyCheckpoints[0]->GetCheckpointTip()); } void ABountyClass::DeActivateFirstCheckpoint() diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h index 84dfe612..3720876c 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h @@ -9,6 +9,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE(FCompletedFirstCheckpoint); DECLARE_DYNAMIC_MULTICAST_DELEGATE(FCompletedACheckpoint); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FCheckpointActivated, const FString&, CheckpointTip); UCLASS() class ENDLESSVENDETTA_API ABountyClass : public AActor @@ -32,6 +33,8 @@ protected: public: FCompletedACheckpoint CompletedACheckpoint; + FCheckpointActivated CheckpointActivated; + // Gets the Reward Money for Completing this Bounty, used by Players Character int GetRewardMoney() { diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckpointClass.h b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckpointClass.h index 2f541e61..348f042d 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckpointClass.h +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckpointClass.h @@ -76,7 +76,11 @@ public: if (WaypointActor) WaypointActor->Destroy(); } - + // Used by Bounty Class to broadcast checkpoint tip for current checkpoint + FString GetCheckpointTip() + { + return CheckpointTip; + } @@ -90,10 +94,7 @@ public: // ------ Getters for CP Properties ------ - FString GetCheckpointTip() - { - return CheckpointTip; - } + FVector GetWaypointLoc() { diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.h b/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.h index 9908df07..8e1c99af 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.h +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.h @@ -94,6 +94,12 @@ public: // Overrides to Desapwn Waypoint from OpenWorld Checkpoint void DeActivateFirstCheckpoint() override; + // Returns open world checkpoints tip + FString GetOpenWorldCheckpointTip() + { + return OpenWorldcheckpoint->GetCheckpointTip(); + } + // ------------------- LEGACY CODE TO BE REWORKED --------------------------------- diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp index fc7a38ea..de3835f4 100644 --- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp @@ -20,13 +20,15 @@ void ABountyHunterCharacter::SpawnMainBounty(UEVGameInstance* GI) CurrentMainBounty = GetWorld()->SpawnActor(MainBountyClasses[CurrentMainBountyIndex]); const FAttachmentTransformRules AttachmentTransformRules(EAttachmentRule::SnapToTarget, true); CurrentMainBounty->AttachToComponent(GetRootComponent(), AttachmentTransformRules); + CurrentMainBounty->CheckpointActivated.AddDynamic(this, &ABountyHunterCharacter::DisplayCheckpointTip); MainBountyStruct = CurrentMainBounty->MainBountyStruct; if (UGameplayStatics::GetCurrentLevelName(GetWorld()) != OpenWorldLevelName) { CurrentMainBounty->SpawnCheckpoints(); return; } - CurrentMainBounty->SpawnOpenWorldCheckpoint(); + CurrentMainBounty->SpawnOpenWorldCheckpoint(); + TrackMainBounty(); } void ABountyHunterCharacter::SpawnSideBounties(UEVGameInstance* GI) @@ -39,6 +41,7 @@ void ABountyHunterCharacter::SpawnSideBounties(UEVGameInstance* GI) SpawnedSideBounty->AttachToComponent(GetRootComponent(), AttachmentTransformRules); SpawnedSideBounty->SpawnCheckpoints(); CurrentSideBounties.Add(SpawnedSideBounty); + SpawnedSideBounty->CheckpointActivated.AddDynamic(this, &ABountyHunterCharacter::DisplayCheckpointTip); } SideBountyStructs.Empty(); @@ -47,6 +50,8 @@ void ABountyHunterCharacter::SpawnSideBounties(UEVGameInstance* GI) SideBountyStructs.Add(SideBounty->SideBountyStruct); SideBounty->CompletedSideBounty.AddDynamic(this, &ABountyHunterCharacter::CompletedASideBounty); } + + if (!IsValid(CurrentMainBounty)) DisplayCheckpointTip("SELECT A NEW BOUNTY IN PAUSE MENU"); } void ABountyHunterCharacter::CompleteCurrentMainBounty(UEVGameInstance* GI) @@ -81,6 +86,7 @@ void ABountyHunterCharacter::CompletedASideBounty(int CompletedSideBountiesUID) TitleOfSideBountyToRemove = SideBountyStructs[i].BountyTitle; SideBountyStructs.RemoveAt(i); UpdateBountyTabInfo(); + DisplayCheckpointTip("SELECT A NEW BOUNTY IN PAUSE MENU"); break; } @@ -107,6 +113,7 @@ void ABountyHunterCharacter::SavePlayerMoneyAndFavours() void ABountyHunterCharacter::BeginPlay() { + Super::BeginPlay(); UEVGameInstance* GI = Cast(GetGameInstance()); if (IsValid(GI->MainSaveGameInstanceRef)) { @@ -122,7 +129,6 @@ void ABountyHunterCharacter::BeginPlay() } } CreatePauseMenuTabs(); - Super::BeginPlay(); } void ABountyHunterCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h index 8329c1dc..f0636f5d 100644 --- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h +++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h @@ -84,6 +84,9 @@ protected: // Called When Player Spawns virtual void BeginPlay() override; + UFUNCTION(BlueprintImplementableEvent) + void DisplayCheckpointTip(const FString& NewCheckpointTip); + // Overridden to Setup up Pause Menu Inputs virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override; @@ -271,6 +274,7 @@ private: { DeActivateAllBounties(); CurrentMainBounty->ActivateFirstCheckpoint(); + DisplayCheckpointTip(CurrentMainBounty->GetOpenWorldCheckpointTip()); } UFUNCTION()