// Project Lab - NHTV Igad

#pragma once

#include "Animation/AnimInstance.h"
#include "PlayerSetupState.h"
#include "WiebertAnimation.generated.h"

/**
 * 
 */
UCLASS()
class UNREALPROJECT_API UWiebertAnimation : public UAnimInstance
{
	GENERATED_BODY()

public:
	UWiebertAnimation(const FObjectInitializer& init);

	virtual void NativeInitializeAnimation() override;
	virtual void NativeUpdateAnimation(float DeltaSeconds) override;

	virtual FAnimInstanceProxy* CreateAnimInstanceProxy();
	virtual void DestroyAnimInstanceProxy(FAnimInstanceProxy* InProxy);

	UFUNCTION(BlueprintNativeEvent, Category="Animation")
	void OnSwingAnimation();

	UFUNCTION(BlueprintCallable, Category = "Animation")
	void SetCharacterCustomization(const FCharacterCustomization& characterCustomization);

	UPROPERTY(BlueprintReadOnly, Category="Animation")
	class ANetworkCharacter* character;
	UPROPERTY(BlueprintReadWrite, Category = "Animation")
	bool attacking;

	FCharacterCustomization charCustomization;
private:
	// Keeps track of how many times an animation was triggered
	int32 m_swingAnimationSequence;
	struct FMainAnimProxy* m_mainAnimProxy;
};
