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

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "Components/ArrowComponent.h"
#include "Engine/World.h"
#include "Engine/Engine.h"
#include "PawnMain.generated.h"

UENUM(BlueprintType, Category = "Movement")
enum class EMovementType : uint8 {
	Fly = 0 UMETA(DisplayName = "Fly"),
	Walk = 1 UMETA(DisplayName = "Walk")
};

UCLASS()
class LOST_EDGE_API APawnMain : public APawn
{
	GENERATED_BODY()

public:
	// Sets default values for this pawn's properties
	APawnMain();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

private:
	/*UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Movement", meta = (AllowPrivateAccess = "true"))
	class UArrowComponent *GravityArrow;*/

	FVector MovementDirection;
	float JumpForce;
	UPROPERTY(EditAnywhere, Category = "Movement")
		float MovementSpeed = 500;
	UPROPERTY(EditAnywhere, Category = "Movement")
		float MovementHeightTolerance = 10;
	UPROPERTY(EditAnywhere, Category = "Movement")
		EMovementType MovementType = EMovementType::Walk;
	UPROPERTY(EditAnywhere, Category = "Movement")
		FVector GravityVector = FVector(0,0,-10);

	UFUNCTION(BlueprintCallable, Category = "Movement")
	void MoveX(float Value);
	UFUNCTION(BlueprintCallable, Category = "Movement")
	void MoveY(float Value);
	UFUNCTION(BlueprintCallable, Category = "Movement")
	void MoveZ(float Value);
};
