// Project Lab - NHTV Igad

#pragma once

#include "BehaviorTree/Tasks/BTTask_BlackboardBase.h"
#include "BTTaskNodeClimb.generated.h"

/**
 * 
 */
UCLASS(config = Game)
class UNREALPROJECT_API UBTTaskNodeClimb : public UBTTaskNode
{
	GENERATED_BODY()
public :
	UPROPERTY(config, Category = Node, EditAnywhere, meta = (ClampMin = "0.0"))
	float AcceptableRadius;
	FName GetSelectedBlackboardKey() const;
	UBTTaskNodeClimb();
	virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
	virtual void TickTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override;
	virtual void InitializeFromAsset(UBehaviorTree& Asset) override;
	UPROPERTY(EditAnywhere, Category = Blackboard)
	 FBlackboardKeySelector directionKey;
	UPROPERTY(EditAnywhere, Category = Blackboard)
		FBlackboardKeySelector BlackboardKey;
protected:
	EBTNodeResult::Type PeformClimbTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory);

	
};

FORCEINLINE FName UBTTaskNodeClimb::GetSelectedBlackboardKey() const
{
	return directionKey.SelectedKeyName;
}
