From c0e942ef7fdfac7d8f4ffebb1114de249ddf91fd Mon Sep 17 00:00:00 2001 From: Rafal Swierczek Date: Tue, 23 Jan 2024 21:39:20 +0000 Subject: [PATCH] Created a Template for Bounty Hunter Character basic Bounty Directing Functionality --- .../.idea.EndlessVendetta/.idea/workspace.xml | 3 +- .../Characters/BountyHunterCharacter.cpp | 16 +++++++++ .../Characters/BountyHunterCharacter.h | 35 ++++++++++++++++++- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml index a6a97e90..0712731c 100644 --- a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml +++ b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml @@ -8,6 +8,7 @@ + @@ -127,7 +128,7 @@ - + diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp index c5825e33..2e412a0f 100644 --- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp @@ -3,7 +3,23 @@ #include "BountyHunterCharacter.h" +void ABountyHunterCharacter::SpawnBounties() +{ + +} + +void ABountyHunterCharacter::CompleteCurrentMainBounty() +{ + +} + void ABountyHunterCharacter::BeginPlay() { Super::BeginPlay(); } + +void ABountyHunterCharacter::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); +} + diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h index 5d4ea5e1..1a0f9d3c 100644 --- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h +++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h @@ -13,8 +13,41 @@ UCLASS() class ENDLESSVENDETTA_API ABountyHunterCharacter : public AEndlessVendettaCharacter { GENERATED_BODY() +// ------------------- ATTRIBUTES ------------------------------ -protected: + // Array of Main Bounties' Classes in Order + UPROPERTY(EditDefaultsOnly, Category = "Bounty Hunter") + TArray> MainBountyClasses; + + // Reference to the Currently Active Main Bounty + UPROPERTY(VisibleAnywhere, Category = "Bounty Hunter") + AMainBountyClass* ActiveMainBounty; + + // Index of Currently Active Main Bounty, Used for MainBountyClasses + int CurrentMainBountyIndex = 0; + +protected: + + +public: + + +// ------------------- METHODS --------------------------------- +private: + // Spawns Main Bounty from MainBountyClasses at the CurrentMainBountyIndex, along with its Side Bounties + UFUNCTION(BlueprintCallable, Category = "Bounty Hunter") + void SpawnBounties(); + + // Checks if Player Completed Current Main Bounty, if so Collects Reward and Tries to Move onto Next Main Bounty + UFUNCTION(BlueprintCallable, Category = "Bounty Hunter") + void CompleteCurrentMainBounty(); + +protected: + // Called When Player Spawns virtual void BeginPlay() override; + + // Called every frame + virtual void Tick(float DeltaTime) override; +public: };