// Project Sword & Gun Copyright © 2021 Kevin Poretti

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "SNGWeaponBase.generated.h"

UCLASS()
class SWORDNGUN_API ASNGWeaponBase : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	ASNGWeaponBase();
	
	virtual float CalculateWeaponDamage();
	
	virtual void SetVisibility(bool IsVisible);

	virtual void PlayImpactEffects(EPhysicalSurface SurfaceType, FVector ImpactPoint);
	
protected:

	UPROPERTY(EditDefaultsOnly, Category="Mesh")
	USkeletalMeshComponent* WeaponMesh;

	/**
	 *	NOTE(kevin): Probably want to make this a collection
	 *	where the index is the surface type and the value is the corresponding
	 *	particle effect
	*/
	UPROPERTY(EditDefaultsOnly, Category="Effects")
	UParticleSystem* DefaultImpactEffect;

	UPROPERTY(EditDefaultsOnly, Category="Effects")
	UParticleSystem* FleshImpactEffect;
	
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

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

};
