// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "DebugLibrary.generated.h"

/**
 * Library containing various functions for debugging.
 */
UCLASS()
class GAMEJAMTEMPLATE_API UDebugLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:

	/**
	* Draws a vector in world space from a starting point
	* in the direction of an end point for the specified length.
	* @param World Pointer to world space.
	* @param VectorStart The starting point of the vector.
	* @param VectorDirection The direction of the vector from the starting point.
	* @param Color The color of the vector.
	* @param ArrowSize The size of the arrow.
	* @param ArrowLength The length of the arrow.
	* @param ArrowThickness The thickness of the arrow.
	*/
	UFUNCTION(BlueprintCallable, Category = "Debug Library")
	static void DrawVector(
		class UWorld* World,
		const FVector& VectorStart,
		const FVector& VectorDirection,
		const FColor& Color = FColor::Black,
		float ArrowSize = 20.0f,
		float ArrowLength = 100.0f,
		float ArrowThickness = 3.0f);

	/**
	* Draws the Forward, Right and Up vector of an Actor.
	* @param Actor The target Actor.
	* @param ArrowSize The size of the arrows.
	* @param ArrowLength The length of the arrows.
	* @param ArrowThickness The thickness of the arrows.
	*/
	UFUNCTION(BlueprintCallable, Category = "Debug Library")
	static void DrawDirectionalVectors(
		class AActor* Actor,
		float ArrowSize = 20.0f,
		float ArrowLength = 100.0f,
		float ArrowThickness = 3.0f);

	/**
	* Prints the specified text on screen.
	* @param Message The debug message.
	* @param Duration How long to display the text.
	* @param Color The color or the text.
	*/
	UFUNCTION(BlueprintCallable, Category = "Debug Library")
	static void PrintTextOnScreen(
		const FString& Message,
		float Duration = -1.0f,
		const FColor& Color = FColor::Black);

};
