Add RandomWeaponParameters to EnemyCharacter
This commit is contained in:
parent
66d923f1a9
commit
0e95cf7239
|
@ -19,6 +19,8 @@ AEnemyCharacter::AEnemyCharacter()
|
||||||
PerceptionComponent->SetDominantSense(SightConfig->GetSenseImplementation());
|
PerceptionComponent->SetDominantSense(SightConfig->GetSenseImplementation());
|
||||||
PerceptionComponent->ConfigureSense(*SightConfig);
|
PerceptionComponent->ConfigureSense(*SightConfig);
|
||||||
|
|
||||||
|
RandomWeaponParameters = CreateDefaultSubobject<URandomWeaponParameters>(TEXT("Random Weapon Parameters"));
|
||||||
|
|
||||||
GetHealthComponent()->SetMaxHealth(100.0f);
|
GetHealthComponent()->SetMaxHealth(100.0f);
|
||||||
|
|
||||||
this->Tags.Add(FName("Enemy"));
|
this->Tags.Add(FName("Enemy"));
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "BehaviorTree/BehaviorTreeComponent.h"
|
#include "BehaviorTree/BehaviorTreeComponent.h"
|
||||||
#include "Perception/AIPerceptionComponent.h"
|
#include "Perception/AIPerceptionComponent.h"
|
||||||
#include <Perception/AISenseConfig_Sight.h>
|
#include <Perception/AISenseConfig_Sight.h>
|
||||||
|
#include "RandomWeaponParameters.h"
|
||||||
#include "EnemyCharacter.generated.h"
|
#include "EnemyCharacter.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +18,7 @@ UCLASS()
|
||||||
class NAKATOMI_API AEnemyCharacter : public ANakatomiCharacter
|
class NAKATOMI_API AEnemyCharacter : public ANakatomiCharacter
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UAIPerceptionComponent* PerceptionComponent;
|
UAIPerceptionComponent* PerceptionComponent;
|
||||||
|
|
||||||
|
@ -25,6 +26,9 @@ private:
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, Meta = (AllowPrivateAccess = "true"))
|
UPROPERTY(EditDefaultsOnly, Meta = (AllowPrivateAccess = "true"))
|
||||||
UBehaviorTree* BehaviourTree;
|
UBehaviorTree* BehaviourTree;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere)
|
||||||
|
URandomWeaponParameters* RandomWeaponParameters;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AEnemyCharacter();
|
AEnemyCharacter();
|
||||||
|
|
Loading…
Reference in New Issue