diff --git a/Source/Nakatomi/EnemyCharacter.cpp b/Source/Nakatomi/EnemyCharacter.cpp index 75cd6cb..cb0041e 100644 --- a/Source/Nakatomi/EnemyCharacter.cpp +++ b/Source/Nakatomi/EnemyCharacter.cpp @@ -19,6 +19,8 @@ AEnemyCharacter::AEnemyCharacter() PerceptionComponent->SetDominantSense(SightConfig->GetSenseImplementation()); PerceptionComponent->ConfigureSense(*SightConfig); + RandomWeaponParameters = CreateDefaultSubobject(TEXT("Random Weapon Parameters")); + GetHealthComponent()->SetMaxHealth(100.0f); this->Tags.Add(FName("Enemy")); diff --git a/Source/Nakatomi/EnemyCharacter.h b/Source/Nakatomi/EnemyCharacter.h index 911a2d8..9d92435 100644 --- a/Source/Nakatomi/EnemyCharacter.h +++ b/Source/Nakatomi/EnemyCharacter.h @@ -7,6 +7,7 @@ #include "BehaviorTree/BehaviorTreeComponent.h" #include "Perception/AIPerceptionComponent.h" #include +#include "RandomWeaponParameters.h" #include "EnemyCharacter.generated.h" @@ -17,7 +18,7 @@ UCLASS() class NAKATOMI_API AEnemyCharacter : public ANakatomiCharacter { GENERATED_BODY() - + private: UAIPerceptionComponent* PerceptionComponent; @@ -25,6 +26,9 @@ private: UPROPERTY(EditDefaultsOnly, Meta = (AllowPrivateAccess = "true")) UBehaviorTree* BehaviourTree; + + UPROPERTY(VisibleAnywhere) + URandomWeaponParameters* RandomWeaponParameters; public: AEnemyCharacter();