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

#pragma once

#include "CoreMinimal.h"
#include "LandingZone.h"
#include "GameFramework/Character.h"
#include "GameFramework/SpringArmComponent.h"

#include "SpaceShip.generated.h"

UCLASS()
class ENDLESSVENDETTA_API ASpaceShip : public ACharacter
{
	GENERATED_BODY()

	ACharacter* PlayersCharacter;
	AController* PlayersController;
	UArrowComponent* SeatComponent;

	ALandingZone* Potential_LZ;

	void SightCheck();

	void BikeSwayBasedOnAcc(float DeltaTime);

	FVector2D MovementVec;
	USpringArmComponent* BikeParentComp;
	FTimerHandle BikeLeanResetTimer;
	void ResetBikeLean()
	{
		MovementVec.X = 0;
		MovementVec.Y = 0;
	}
protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;


public:
	// Sets default values for this pawn's properties
	ASpaceShip();
	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

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

	void PlayerInteracting();

	void MoveShip(FVector2D MovementVector);

	void RotateShip(FVector2D LookAxisVector);

};
