Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // @Maxpro 2017
- #include "CodeTests.h"
- #include "SpiderAIController.h"
- #include "MasterEnemy.h"
- #include "BehaviorTree/BlackboardComponent.h"
- #include "Task_LaunchAttack.h"
- EBTNodeResult::Type UTask_LaunchAttack::ExecuteTask(UBehaviorTreeComponent & OwnerComp, uint8 * NodeMemory)
- {
- Super::ExecuteTask(OwnerComp, NodeMemory);
- NodeName = ThisNodeName;
- ASpiderAIController* AICon = Cast<ASpiderAIController>(OwnerComp.GetAIOwner());
- AMasterEnemy* Enemy = Cast<AMasterEnemy>(AICon->GetPawn());
- UBlackboardComponent* BlackboardComp = AICon->GetBlackboardComp();
- Enemy->LaunchAttack(this);
- return OnAttackLaunched();
- }
- EBTNodeResult::Type UTask_LaunchAttack::OnAttackLaunched()
- {
- return EBTNodeResult::Succeeded;
- }
Add Comment
Please, Sign In to add comment