// Fill out your copyright notice in the Description page of Project Settings. #include "FighterAIController.h" #include "FunnyPrinceCharacter.h" #include "BehaviorTree/BlackboardComponent.h" #include "Kismet/GameplayStatics.h" void AFighterAIController::BeginPlay() { Super::BeginPlay(); if (AIBehavior) { RunBehaviorTree(AIBehavior); GetBlackboardComponent()->SetValueAsVector(TEXT("StartLocation"), GetPawn()->GetActorLocation()); } } void AFighterAIController::Tick(float DeltaSeconds) { Super::Tick(DeltaSeconds); } bool AFighterAIController::IsDead() const { AFunnyPrinceCharacter* ControlledCharacter = Cast(GetPawn()); if (ControlledCharacter) { return ControlledCharacter->IsDead(); } return true; }