
#include "SeekInteractableTask.h"
#include "StateTreeExecutionContext.h"

EStateTreeRunStatus FSeekInteractableTask::EnterState(
	FStateTreeExecutionContext& Context,
	const FStateTreeTransitionResult&) const
{
	// auto& Data = Context.GetInstanceData<APawn>(*this);
	// Data.bMoveFinished = false;
	//
	// AAIController* AI = Context.GetOwner<AAIController>();
	// if (!AI)
	// 	return EStateTreeRunStatus::Failed;
	//
	// FPathFollowingRequestResult Result = AI->MoveToLocation(TargetLocation);
	//
	// if (Result.Code == EPathFollowingRequestResult::Failed)
	// 	return EStateTreeRunStatus::Failed;
	//
	// Data.RequestID = Result.MoveId;
	return EStateTreeRunStatus::Running;
}

EStateTreeRunStatus FSeekInteractableTask::Tick(FStateTreeExecutionContext& Context, const float DeltaTime) const
{
	return FStateTreeTaskBase::Tick(Context, DeltaTime);
}

void FSeekInteractableTask::ExitState(FStateTreeExecutionContext& Context,
	const FStateTreeTransitionResult& Transition) const
{
	FStateTreeTaskBase::ExitState(Context, Transition);
}

