From 2d078ec48ceaa6d081626add4a953da4be398109 Mon Sep 17 00:00:00 2001 From: baz Date: Mon, 24 Jun 2024 21:42:03 +0100 Subject: [PATCH] Add GetGoldComponent function --- Source/vampires/PlayerCharacter.cpp | 5 +++++ Source/vampires/PlayerCharacter.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Source/vampires/PlayerCharacter.cpp b/Source/vampires/PlayerCharacter.cpp index 1f15b6d..177f776 100644 --- a/Source/vampires/PlayerCharacter.cpp +++ b/Source/vampires/PlayerCharacter.cpp @@ -79,6 +79,11 @@ UEXPComponent* APlayerCharacter::GetEXPComponent() return EXPComponent; } +UGoldComponent* APlayerCharacter::GetGoldComponent() +{ + return GoldComponent; +} + void APlayerCharacter::MovementCallback(const FInputActionInstance& Instance) { FVector2D vec2 = Instance.GetValue().Get(); diff --git a/Source/vampires/PlayerCharacter.h b/Source/vampires/PlayerCharacter.h index e2d89fe..dd3d3cd 100644 --- a/Source/vampires/PlayerCharacter.h +++ b/Source/vampires/PlayerCharacter.h @@ -69,6 +69,8 @@ public: UEXPComponent* GetEXPComponent(); + UGoldComponent* GetGoldComponent(); + private: UFUNCTION() void MovementCallback(const FInputActionInstance& Instance);