Add Weapon Inventory Component to Player Character
This commit is contained in:
parent
f25e6366f5
commit
8e1dd981ce
|
@ -38,6 +38,9 @@ APlayerCharacter::APlayerCharacter()
|
|||
GarlicSphereComponent = CreateDefaultSubobject<USphereComponent>(TEXT("Garlic Sphere Component"));
|
||||
GarlicSphereComponent->SetupAttachment(RootComponent);
|
||||
GarlicSphereComponent->SetSphereRadius(150.0f);
|
||||
|
||||
//Create Weapon Inventory Component
|
||||
WeaponInventoryComponent = CreateDefaultSubobject<UWeaponInventoryComponent>(TEXT("Weapon Inventory Component"));
|
||||
}
|
||||
|
||||
void APlayerCharacter::BeginPlay()
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "EXPComponent.h"
|
||||
#include "GoldComponent.h"
|
||||
#include "VampireCharacter.h"
|
||||
#include "WeaponInventoryComponent.h"
|
||||
#include "Camera/CameraComponent.h"
|
||||
#include "Components/SphereComponent.h"
|
||||
#include "GameFramework/SpringArmComponent.h"
|
||||
|
@ -41,20 +42,22 @@ public:
|
|||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
||||
float GarlicUpdateTime = 1.0f;
|
||||
|
||||
protected:
|
||||
UPROPERTY()
|
||||
UEXPComponent* EXPComponent;
|
||||
|
||||
|
||||
UPROPERTY(VisibleAnywhere)
|
||||
USphereComponent* GarlicSphereComponent;
|
||||
|
||||
UPROPERTY()
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TArray<AEnemyCharacter*> OverlappedEnemies;
|
||||
|
||||
UPROPERTY()
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
UEXPComponent* EXPComponent;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
UGoldComponent* GoldComponent;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
UWeaponInventoryComponent* WeaponInventoryComponent;
|
||||
|
||||
private:
|
||||
FTimerHandle GarlicTimerHandle;
|
||||
|
||||
|
|
Loading…
Reference in New Issue