#pragma once

#include "CoreMinimal.h"
#include "KillerProjectileLauncher.h"
#include "UObject/NoExportTypes.h"
#include "EBombType.h"
#include "BombLauncher.generated.h"

class UCurveFloat;

UCLASS(Blueprintable, EditInlineNew, meta=(BlueprintSpawnableComponent))
class UBombLauncher : public UKillerProjectileLauncher
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	UCurveFloat* _speedCurve;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	UCurveFloat* _pitchCurve;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FVector _bombLaunchPositionOffsetFromCamera;

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, meta=(AllowPrivateAccess=true))
	EBombType _currentBombType;

public:
	UFUNCTION(BlueprintCallable)
	void SetProjectileSpeedCurve(UCurveFloat* newProjectileSpeedCurve);

	UFUNCTION(BlueprintCallable)
	void SetProjectilePitchCurve(UCurveFloat* newProjectilePitchCurve);

	UFUNCTION(BlueprintCallable)
	void SetPercentThrowStrength(float throwStrength);

	UFUNCTION(BlueprintCallable, Server, Reliable)
	void Server_SwitchBombType();

	UFUNCTION(BlueprintCallable)
	void LocalLaunch(float percentThrowStrength);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void Local_SwitchBombType();

	UFUNCTION(BlueprintPure)
	bool IsBombFullyCharged() const;

	UFUNCTION(BlueprintPure)
	float GetPercentThrowStrenght() const;

	UFUNCTION(BlueprintPure)
	EBombType GetCurrentBombType() const;

public:
	virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;

public:
	UBombLauncher();
};

FORCEINLINE uint32 GetTypeHash(const UBombLauncher) { return 0; }
