Add reworked Worker Enemy AI #3

Closed
baz wants to merge 24 commits from worker-ai into master
2 changed files with 33 additions and 0 deletions
Showing only changes of commit 594ef5f158 - Show all commits

View File

@ -0,0 +1,14 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "../Decorators/BTDHasPatrolRoute.h"
#include "Nakatomi/EnemyAIController.h"
bool UBTDHasPatrolRoute::CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const
{
AEnemyAIController* enemyController = Cast<AEnemyAIController>(OwnerComp.GetAIOwner());
AEnemyCharacter* enemyPawn = Cast<AEnemyCharacter>(enemyController->GetPawn());
return enemyPawn->CurrentPatrolRoute ? true : false;
}

View File

@ -0,0 +1,19 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "BehaviorTree/BTDecorator.h"
#include "BTDHasPatrolRoute.generated.h"
/**
*
*/
UCLASS(Blueprintable)
class NAKATOMI_API UBTDHasPatrolRoute : public UBTDecorator
{
GENERATED_BODY()
public:
virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override;
};