#pragma once

#include "CoreMinimal.h"
#include "GameFramew./BulletNode.generated.h"

UCLASS()
class YOURPROJECT_API ABulletNode : public AActor
{
	GENERATED_BODY()

public:
	// Sets default values for this actor's properties
	ABulletNode();

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

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

	// The speed at which the bullet node moves
	UPROPERTY(EditAnywhere, Category = "BulletNode")
	float MovementSpeed;

	// The distance the bullet node should travel before rotating
	UPROPERTY(EditAnywhere, Category = "BulletNode")
	float MovementDistance;

	// The angle at which the bullet node should rotate
	UPROPERTY(EditAnywhere, Category = "BulletNode")
	float RotationAngle;

private:
	// The initial position of the bullet node
	FVector InitialPosition;

	// The direction in which the bullet node should move
	FVector Direction;

	// The distance traveled by the bullet node
	float TraveledDistance;

	// Flag indicating whether the bullet node should rotate
	bool bShouldRotate;
};