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 = CreateDefaultSubobject<USphereComponent>(TEXT("Garlic Sphere Component"));
|
||||||
GarlicSphereComponent->SetupAttachment(RootComponent);
|
GarlicSphereComponent->SetupAttachment(RootComponent);
|
||||||
GarlicSphereComponent->SetSphereRadius(150.0f);
|
GarlicSphereComponent->SetSphereRadius(150.0f);
|
||||||
|
|
||||||
|
//Create Weapon Inventory Component
|
||||||
|
WeaponInventoryComponent = CreateDefaultSubobject<UWeaponInventoryComponent>(TEXT("Weapon Inventory Component"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void APlayerCharacter::BeginPlay()
|
void APlayerCharacter::BeginPlay()
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "EXPComponent.h"
|
#include "EXPComponent.h"
|
||||||
#include "GoldComponent.h"
|
#include "GoldComponent.h"
|
||||||
#include "VampireCharacter.h"
|
#include "VampireCharacter.h"
|
||||||
|
#include "WeaponInventoryComponent.h"
|
||||||
#include "Camera/CameraComponent.h"
|
#include "Camera/CameraComponent.h"
|
||||||
#include "Components/SphereComponent.h"
|
#include "Components/SphereComponent.h"
|
||||||
#include "GameFramework/SpringArmComponent.h"
|
#include "GameFramework/SpringArmComponent.h"
|
||||||
|
@ -42,19 +43,21 @@ public:
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
||||||
float GarlicUpdateTime = 1.0f;
|
float GarlicUpdateTime = 1.0f;
|
||||||
|
|
||||||
protected:
|
|
||||||
UPROPERTY()
|
|
||||||
UEXPComponent* EXPComponent;
|
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere)
|
UPROPERTY(VisibleAnywhere)
|
||||||
USphereComponent* GarlicSphereComponent;
|
USphereComponent* GarlicSphereComponent;
|
||||||
|
|
||||||
UPROPERTY()
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
TArray<AEnemyCharacter*> OverlappedEnemies;
|
TArray<AEnemyCharacter*> OverlappedEnemies;
|
||||||
|
|
||||||
UPROPERTY()
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
UEXPComponent* EXPComponent;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
UGoldComponent* GoldComponent;
|
UGoldComponent* GoldComponent;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
UWeaponInventoryComponent* WeaponInventoryComponent;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FTimerHandle GarlicTimerHandle;
|
FTimerHandle GarlicTimerHandle;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue