diff --git a/Source/vampires/EnemyCharacter.cpp b/Source/vampires/EnemyCharacter.cpp new file mode 100644 index 0000000..c0b961d --- /dev/null +++ b/Source/vampires/EnemyCharacter.cpp @@ -0,0 +1,18 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "EnemyCharacter.h" + +AEnemyCharacter::AEnemyCharacter(const FObjectInitializer& ObjectInitializer) +{ +} + +void AEnemyCharacter::BeginPlay() +{ + Super::BeginPlay(); +} + +void AEnemyCharacter::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); +} diff --git a/Source/vampires/EnemyCharacter.h b/Source/vampires/EnemyCharacter.h new file mode 100644 index 0000000..d7dbf2b --- /dev/null +++ b/Source/vampires/EnemyCharacter.h @@ -0,0 +1,31 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "VampireCharacter.h" +#include "BehaviorTree/BehaviorTree.h" +#include "EnemyCharacter.generated.h" + +/** + * + */ +UCLASS() +class VAMPIRES_API AEnemyCharacter : public AVampireCharacter +{ + GENERATED_BODY() + +private: + + UPROPERTY(EditDefaultsOnly, Meta = (AllowPrivateAccess = "true")) + UBehaviorTree* BehaviourTree; + +public: + AEnemyCharacter(const FObjectInitializer& ObjectInitializer); + +protected: + virtual void BeginPlay() override; + +public: + virtual void Tick(float DeltaTime) override; +}; diff --git a/Source/vampires/VampireAIController.cpp b/Source/vampires/VampireAIController.cpp new file mode 100644 index 0000000..aaa833d --- /dev/null +++ b/Source/vampires/VampireAIController.cpp @@ -0,0 +1,31 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "VampireAIController.h" + +AVampireAIController::AVampireAIController(const FObjectInitializer& object_initializer) +{ +} + +void AVampireAIController::BeginPlay() +{ + Super::BeginPlay(); +} + +void AVampireAIController::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); +} + +void AVampireAIController::OnPossess(APawn* InPawn) +{ + Super::OnPossess(InPawn); +} + +void AVampireAIController::OnDamaged(FDamageInfo info) +{ +} + +void AVampireAIController::OnDeath(FDamageInfo info) +{ +} diff --git a/Source/vampires/VampireAIController.h b/Source/vampires/VampireAIController.h new file mode 100644 index 0000000..755f1a0 --- /dev/null +++ b/Source/vampires/VampireAIController.h @@ -0,0 +1,45 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "AIController.h" +#include "HealthComponent.h" +#include "PlayerCharacter.h" +#include "BehaviorTree/BehaviorTreeComponent.h" +#include "VampireAIController.generated.h" + +/** + * + */ +UCLASS() +class VAMPIRES_API AVampireAIController : public AAIController +{ + GENERATED_BODY() + +private: + UBlackboardComponent* Blackboard; + + UBehaviorTreeComponent* BehaviorTree; + + APlayerCharacter* PlayerCharacter; + +public: + AVampireAIController(const FObjectInitializer& object_initializer); + +protected: + virtual void BeginPlay() override; + +public: + virtual void Tick(float DeltaTime) override; + +protected: + virtual void OnPossess(APawn* InPawn) override; + +public: + UFUNCTION() + virtual void OnDamaged(FDamageInfo info); + + UFUNCTION() + virtual void OnDeath(FDamageInfo info); +}; diff --git a/vampires.uproject b/vampires.uproject index 8f7c464..31f8750 100644 --- a/vampires.uproject +++ b/vampires.uproject @@ -9,7 +9,8 @@ "Type": "Runtime", "LoadingPhase": "Default", "AdditionalDependencies": [ - "Engine" + "Engine", + "AIModule" ] } ],