// Project Sword & Gun Copyright © 2021 Kevin Poretti

#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "Weapons/SNGWeaponBase.h"

#include "SNGWeaponInventoryComponent.generated.h"


UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class SWORDNGUN_API USNGWeaponInventoryComponent : public UActorComponent
{
	GENERATED_BODY()

public:	
	// Sets default values for this component's properties
	USNGWeaponInventoryComponent();

	UFUNCTION(BlueprintCallable)
	ASNGWeaponBase* GetCurrentWeapon();

	UFUNCTION(BlueprintCallable)
	void SetCurrentWeapon(int WeaponIndex);
	
protected:
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Weapons")
	TArray<TSubclassOf<ASNGWeaponBase>> WeaponClasses;

	UPROPERTY(BlueprintReadOnly, Category="Weapons")
	TArray<ASNGWeaponBase*> Weapons;

	ASNGWeaponBase* CurrWeapon;
	
	// Called when the game starts
	virtual void BeginPlay() override;		
};
