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

#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "AC_PlayerStats.generated.h"


UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class EPIC_INVENTORY_API UAC_PlayerStats : public UActorComponent
{
	GENERATED_BODY()

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

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Player Stat Defaults")
	float MaxHealth = 100;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Player Stat Defaults")
	float MaxStamina = 100;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Player Stat Defaults")
	float MaxMana = 100;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Player Stat Defaults")
	float MaxCarryWeight = 200;

	UPROPERTY(BlueprintReadWrite, Category = "Current Player Stats")
	float CurrentHealth;

	UPROPERTY(BlueprintReadWrite, Category = "Current Player Stats")
	int32 PlayerLevel = 1;

	UPROPERTY(BlueprintReadWrite, Category = "Current Player Stats")
	float CurrentStamina;

	UPROPERTY(BlueprintReadWrite, Category = "Current Player Stats")
	float CurrentMana;

	UPROPERTY(BlueprintReadWrite, Category = "Current Player Stats")
	float CurrentCarryWeight;

	UFUNCTION(BlueprintCallable)
	void InitializePlayerStats();

	UFUNCTION(BlueprintCallable)
	void UpdateCurrentCarryWeight();

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

public:	
	// Called every frame
	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

		
};
